-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathCiclos.java
More file actions
28 lines (25 loc) · 787 Bytes
/
Ciclos.java
File metadata and controls
28 lines (25 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
public class Ciclos {
public static void main(String[] args) {
// Ciclos
// Estructura de control para
// recorrer un cojunto de datos
// Arreglo
// Esturctrua númerica.
// For
for (int i = 1; i <= 50; i++) {
System.out.println(i + ".- No debo hablar en clase");
}
// While
int numeroWhile = 0;
while (numeroWhile <= 50) {
System.out.println(numeroWhile + ".- No debo hablar en clase con while ");
numeroWhile++;
}
// Do While
int numeroDoWhile = 0;
do {
System.out.println(numeroDoWhile + ".- No debo hablar en clase con do while ");
numeroDoWhile++;
} while (numeroDoWhile <= 50);
}
}