Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package nestedloops;
- public class StevenLoop {
- public static void main(String[] args) {
- int count = 6;
- for (int i = 0; i < 12; i++)
- {
- System.out.println("");
- for (int j = 6; j > 0; j--)
- {
- if (i >= j)
- {
- if (i <= 6)
- {
- System.out.print(j);
- }
- if (i > 6)
- {
- if (j - count < 0)
- {
- System.out.print(j);
- }
- else
- {
- System.out.print(" ");
- }
- }
- }
- }
- }
- System.out.println("");}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement