ltd-graph-builder/src/test/res/ejemplos/Bucles_6.java

28 lines
396 B
Java
Raw Normal View History

2019-03-26 20:11:14 +01:00
package ejemplos;
public class Bucles_6 {
public static void main(String[] args)
{
// BUCLE WHILE (sin anidamiento)
System.out.println("Empieza bucle WHILE:");
int x=1;
while (x<=10)
{
System.out.print(" "+x);
x++;
while (x<=10)
{
System.out.print(" "+x);
x++;
}
}
while (x<=10)
{
System.out.print(" "+x);
x++;
}
System.out.println();
}
}