Java_Proyectos_NetBeans/Apuntes_guia/basicos/WhileDoWhile.java

23 lines
589 B
Java
Raw Permalink Normal View History

2020-11-16 01:57:38 -03:00
//--------------- jp.av.dev@gmail.com ---------------//
//----------------- While, Do While -----------------//
package apuntes.pkg;
import java.util.Scanner;
public class WhileDoWhile {
public static void main(String[] args) {
Scanner s= new Scanner(System.in);
int num=0;
while(num < 3 ){
System.out.println("Hola");
num++;
do{
num = 0;
if (num%2==0)
{System.out.println(num);
num++;}
}while(num < 100);
}
}
}