Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(int i = 1; i <= 9; i++)
- {
- //print spaces
- for (int j = 0; j < #spaces; j++)
- System.out.print(" ");
- //print digits (need to print i digits)
- for (int j = 1; j < i; j++)
- System.out.print(digit);
- //print spaces
- for (int j= 1; j < #spaces; j++)
- System.out.print(" ")
- System.out.println();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement