Saved Bookmarks
| 1. |
Answer please13 35 5 57 7 7 79 9 9 9 9 write a logical program using nested loopany newsense will be reported. |
|
Answer» Write a program to display the FOLLOWING pattern. 1 33 555 7777 99999 import java.util.*; class Pattern { { Scanner sc = new Scanner(System.in); System.out.print("Enter the number of ROWS for the pattern: "); int rows=sc.nextInt(); for(int i=1;i<=rows;i+=+) { int a=1; for(int j=1;j<=i;j++) System.out.print(a+" "); a+=2; System.out.println(); } } // END of main. } // end of class. |
|