Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. package javaapplication16;
  2. public class JavaApplication16
  3. {
  4.  
  5.  
  6. public static void main(String[] args)
  7. {
  8. int a = 1;
  9. double b = 1;
  10. for (int rep = 1;rep <= 10; rep++)
  11.  
  12. {
  13. for (a = a; a<=100;a++)
  14. {
  15. if((a >=1 && a <=10)||(a >=21 && a <=30)||(a >=41 && a <=50)||(a >=61 && a <=70)||(a >=81 && a <=90) )
  16. {
  17. System.out.print(" "+a);
  18. }
  19.  
  20. }
  21. System.out.println(" ");
  22. for( b = b;b<=100;b++)
  23. {
  24. if((b >=11 && b <=20)||(b >=31 && b <=40)||(b >=51 && b <=60)||(b >=71 && b <=80) )
  25. {
  26. System.out.print(" "+b);
  27. }
  28. }
  29. System.out.println(" ");
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement