Q:

Java - while Statement

0

This Program is used to demonstrate while statement.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

class ssvwhile 
{ 
public static void main(String arg[]) 
  { 
     int n=1; 

     while(n <=5 ) 
       { 
           int m =1; 

           while(m <= n) 
              { 
                 System.out.print(n); 
                 m = m+1; 
              } 
           System.out.println(); 
           n = n+1; 
      } 
  } 
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now