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
56b6461e
Commit
56b6461e
authored
Sep 08, 2020
by
Juan Cristaldo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ejercicio 8 Realizado
parent
cd54bf8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
JavaApplication/src/javaapplication/Ejercicio08.java
+27
-0
No files found.
JavaApplication/src/javaapplication/Ejercicio08.java
0 → 100644
View file @
56b6461e
/*
* 8. Lee un número por teclado y comprueba que este numero es mayor o igual que cero, si
* no lo es lo volverá a pedir (do while), después muestra ese número por consola.
*/
package
javaapplication
;
import
java.util.Scanner
;
/**
*
* @author Juan Cristaldo
*/
public
class
Ejercicio08
{
public
static
void
main
(
String
[]
args
)
{
Scanner
entrada
=
new
Scanner
(
System
.
in
);
System
.
out
.
println
(
"***Operacion***"
);
int
numero
;
do
{
System
.
out
.
println
(
"Ingrese un número mayor o igual a 0: "
);
numero
=
entrada
.
nextInt
();
}
while
(
numero
<
0
);
System
.
out
.
println
(
"El número ingresado es: "
+
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