class dowhile
{
public static void main(String args[])
{
int i=1;
do{
System.out.println("welcone to world "+i);
i++;//increament
}while(i<=5);
System.out.println("\n\n\n\n");
do{
System.out.println("welcone to world "+i);
i--;//decreament
}while(i>=1);
}
}
//first execute the loop and next check the condition
{
public static void main(String args[])
{
int i=1;
do{
System.out.println("welcone to world "+i);
i++;//increament
}while(i<=5);
System.out.println("\n\n\n\n");
do{
System.out.println("welcone to world "+i);
i--;//decreament
}while(i>=1);
}
}
//first execute the loop and next check the condition