Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. //1.2)
  2. import java.util.Scanner;
  3.  
  4. public class Main {
  5. public static void main(String[] args) {
  6. Scanner in = new Scanner(System.in);
  7. int x = in.nextInt();
  8. int y = in.nextInt();
  9. int z = in.nextInt();
  10.  
  11. System.out.print("x, y, z > 100 ? ");
  12. if(x > 100 && y > 100 && z > 100)
  13. System.out.println("true");
  14. else
  15. System.out.println("false");
  16. String s = in.nextLine();
  17.  
  18. int a = in.nextInt();
  19. System.out.print("A mod (2 or 3) == 0 ? ");
  20. if(a % 2 == 0 || a % 3 == 0)
  21. System.out.println("true");
  22. else
  23. System.out.println("false");
  24. s = in.nextLine();
  25. a = in.nextInt();
  26. System.out.print("A mod 3 != 0 and A mod 10 == 0 ? ");
  27. if(a % 3 !=0 && a % 10 == 0)
  28. System.out.println("true");
  29. else
  30. System.out.println("false");
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement