Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. class Main
  2. {
  3. public static void main(String[] args)
  4. {
  5. // You should have four separate for loops below
  6. for(int i = 0; i < 9; i++)
  7. {
  8. System.out.print(i);
  9. System.out.print(", ");
  10. }
  11.  
  12. System.out.println();
  13.  
  14. for(int i = 10; i > 0; i--)
  15. {
  16. System.out.print(i);
  17. System.out.print(", ");
  18. }
  19.  
  20. System.out.println();
  21.  
  22. for(int i = 30; i > -30; i-=10)
  23. {
  24. System.out.print(i);
  25. System.out.print(", ");
  26. }
  27.  
  28. System.out.println();
  29.  
  30. for(int i = 4; i < 80; i+=15)
  31. {
  32. System.out.print(i);
  33. System.out.print(", ");
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement