Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
java-e001
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Silvia Barrientos
java-e001
Commits
17867e4b
Commit
17867e4b
authored
Sep 09, 2020
by
Silvia Barrientos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
java
parents
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
0 deletions
+62
-0
Ejercicio01.java
+18
-0
Ejercicio02.java
+16
-0
Ejercicio03.java
+11
-0
Ejercicio04.java
+17
-0
No files found.
Ejercicio01.java
0 → 100644
View file @
17867e4b
public
class
Ejercicio01
{
public
static
void
main
(
String
[]
args
)
{
int
valor1
=
12
;
int
valor2
=
5
;
suma
(
valor1
,
valor2
);
}
public
static
void
suma
(
int
val1
,
int
val2
){
int
suma
=
val1
+
val2
;
System
.
out
.
printf
(
"La suma de %d + %d es: %d\n"
,
val1
,
val2
,
suma
);
}
}
Ejercicio02.java
0 → 100644
View file @
17867e4b
public
class
Ejercicio02
{
public
static
void
main
(
String
[]
args
)
{
int
valor1
=
1
;
int
valor2
=
1
;
comparacion
(
valor1
,
valor2
);
}
public
static
void
comparacion
(
int
val1
,
int
val2
){
if
(
val1
<
val2
)
System
.
out
.
printf
(
"\n%d < %d\n"
,
val1
,
val2
);
if
(
val1
>
val2
)
System
.
out
.
printf
(
"\n%d > %d\n"
,
val1
,
val2
);
if
(
val1
==
val2
)
System
.
out
.
printf
(
"\n%d == %d\n"
,
val1
,
val2
);
}
}
Ejercicio03.java
0 → 100644
View file @
17867e4b
public
class
Ejercicio03
{
public
static
void
main
(
String
[]
args
)
{
String
nombre
=
"Silvia"
;
bienvenida
(
nombre
);
}
public
static
void
bienvenida
(
String
nom
){
System
.
out
.
printf
(
"\nBienvenida %s \n"
,
nom
);
}
}
Ejercicio04.java
0 → 100644
View file @
17867e4b
/*import java.util.Scanner;
public class Ejercicio04 {
public static void main(String[] args) {
String nombre;
Scanner entrada = new Scanner(System.in);
nombre = entrada.next();
bienvenida(nombre);
}
public static void bienvenida(String nom){
System.out.printf("\nBienvenida %s \n", nom);
}
}*/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment