Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement