Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. import java.lang.*;
  2. import java.io.*;
  3. public class p21
  4. {
  5. public static void main(String args[])
  6. {
  7. int i,j; i=20;
  8. while (i<100)
  9. {
  10. j=i/20;
  11. System.out.println(" j:"+j+" i:"+i);
  12. i=i+15;
  13. }
  14. System.out.println("_________________________");
  15. int a,b; a=20;
  16. b=a/20;
  17. do
  18. {
  19. a=a+15;
  20.  
  21. System.out.println(" j:"+b+" i:"+a);
  22. }
  23. while (a<=100);
  24. System.out.println("_________________________");
  25.  
  26. int y;
  27. for (int x=20;x<100;x++)
  28. {
  29. x=x+15;
  30. y=x/20;
  31. System.out.println(" j:"+y+" i:"+x);
  32.  
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement