Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. public class Main {
  2.  
  3. public static void main(String[] args) {
  4. for(int i = 1; i < 35; i++) {
  5. if (i % 3 == 0){
  6. System.out.println("Pling");
  7.  
  8. if (i % 5 == 0){
  9. System.out.println("Plang");
  10.  
  11. if (i % 7 == 0){
  12. System.out.println("Plong");
  13.  
  14. if (i % 3 != 0 && i % 5 != 0 && i % 7 != 0){
  15.  
  16. System.out.println(i);
  17. }
  18. System.out.println();
  19. }
  20. }
  21. }
  22.  
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement