Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- int row = 5;
- for (int i=0;i<row;i++) {
- int space = row - i;
- for (int j=0;j<space; j++){
- System.out.print(" ");
- }
- for (int k=0; k<(i+2+i);k++){
- System.out.print("*");
- }
- System.out.println("");
- }
- for (int i=0; i<row;i++){
- System.out.print(" ");
- }
- System.out.println("*");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement