SHARE
TWEET

Untitled

a guest Dec 3rd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static void main(String[] args) {
  2.         int row = 5;
  3.         for (int i=0;i<row;i++) {
  4.             int space = row - i;
  5.             for (int j=0;j<space; j++){
  6.                 System.out.print(" ");
  7.             }
  8.             for (int k=0; k<(i+2+i);k++){
  9.                 System.out.print("*");
  10.     }
  11.             System.out.println("");
  12.         }
  13.         for (int i=0; i<row;i++){
  14.             System.out.print(" ");
  15.         }
  16.         System.out.println("*");
  17.    
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top