Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. package nestedloops;
  2. public class StevenLoop {
  3. public static void main(String[] args) {
  4. int count = 6;
  5. for (int i = 0; i < 12; i++)
  6. {
  7. System.out.println("");
  8. for (int j = 6; j > 0; j--)
  9. {
  10. if (i >= j)
  11. {
  12. if (i <= 6)
  13. {
  14. System.out.print(j);
  15. }
  16.  
  17.  
  18. if (i > 6)
  19. {
  20. if (j - count < 0)
  21. {
  22. System.out.print(j);
  23.  
  24. }
  25. else
  26. {
  27. System.out.print(" ");
  28. }
  29. }
  30. }
  31. }
  32. }
  33. System.out.println("");}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement