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
Juan Cristaldo
java-e001
Commits
cff5be5a
Commit
cff5be5a
authored
Sep 08, 2020
by
Juan Cristaldo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ejercicio 5 Realizado
parent
4f7e2f08
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
JavaApplication/src/javaapplication/Ejercicio04.java
+0
-2
JavaApplication/src/javaapplication/Ejercicio05.java
+30
-0
No files found.
JavaApplication/src/javaapplication/Ejercicio04.java
View file @
cff5be5a
...
...
@@ -14,8 +14,6 @@ public class Ejercicio04 {
public
static
void
main
(
String
[]
args
)
{
// Se puede introducir cualquier nombre
Scanner
entrada
=
new
Scanner
(
System
.
in
);
System
.
out
.
println
(
"***Operaciones***"
);
System
.
out
.
println
(
"Ingrese su nombre"
);
...
...
JavaApplication/src/javaapplication/Ejercicio05.java
0 → 100644
View file @
cff5be5a
/*
* 5. Lee un número por teclado e indica si es divisible entre 2 (resto = 0). Si no lo es,
* también debemos indicarlo.
*/
package
javaapplication
;
import
java.util.Scanner
;
/**
*
* @author Juan Cristaldo
*/
public
class
Ejercicio05
{
public
static
void
main
(
String
[]
args
)
{
Scanner
entrada
=
new
Scanner
(
System
.
in
);
System
.
out
.
println
(
"***Operacion si es divisible entre 2***"
);
System
.
out
.
println
(
"Ingrese un número"
);
int
numero
=
entrada
.
nextInt
();
if
(
numero
%
2
==
0
)
{
System
.
out
.
printf
(
"El número %d es divisible entre 2\n"
,
numero
);
}
else
{
System
.
out
.
printf
(
"El número %d no es divisible entre 2\n"
,
numero
);
}
}
}
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