Advertisement
heysoul_sisypus

Pyramid Loop

Feb 9th, 2020
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.27 KB | None | 0 0
  1.   Scanner scan=new Scanner(System.in);
  2.        
  3.         for(int i=1;i<=10;i++)
  4.         {for(int j=10;j>=i;j--){
  5.             System.out.print(" ");
  6.         }
  7.         for(int k=1;k<=i;k++){  
  8.         System.out.print(" *");
  9.         }
  10.           System.out.println();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement