Answers for "do while example"

C
0

Example of While Loop

public class Test {

   public static void main(String args[]) {
      int x = 10;

      while( x < 20 ) {
         System.out.print("value of x : " + x );
         x++;
         System.out.print("n");
      }
   }
}
Posted by: Guest on August-31-2021
0

Example of a Do..While Loop

public class Test {

   public static void main(String args[]) {
      int x = 10;

      do {
         System.out.print("value of x : " + x );
         x++;
         System.out.print("n");
      }while( x < 20 );
   }
}
Posted by: Guest on August-31-2021
0

while syntax

while(booleanExpression) { 
    //block of code to be executed
}
Posted by: Guest on June-25-2021
-2

whiel loop in C

while (testExpression) 
{
    // statements inside the body of the loop 
}
Posted by: Guest on October-08-2020

Code answers related to "C"

Browse Popular Code Answers by Language