Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. public static void main(String args[]) {
  2.  
  3. for(int i = 1; i < 101; i++)
  4. {
  5. if(i%3 == 0)
  6. {
  7. System.out.println("repetitive of 3");
  8. }
  9.  
  10. else if(i%5 == 0)
  11. {
  12. System.out.println("repetitive of 5");
  13. }
  14.  
  15. else if(i%5 == 0 && i%3 == 0)
  16. {
  17. System.out.println("repetitive of 3 and 5");
  18. }
  19.  
  20.  
  21. else{
  22. System.out.println(i);
  23. }
  24.  
  25.  
  26. }
  27.  
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement