Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //1.2)
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- int x = in.nextInt();
- int y = in.nextInt();
- int z = in.nextInt();
- System.out.print("x, y, z > 100 ? ");
- if(x > 100 && y > 100 && z > 100)
- System.out.println("true");
- else
- System.out.println("false");
- String s = in.nextLine();
- int a = in.nextInt();
- System.out.print("A mod (2 or 3) == 0 ? ");
- if(a % 2 == 0 || a % 3 == 0)
- System.out.println("true");
- else
- System.out.println("false");
- s = in.nextLine();
- a = in.nextInt();
- System.out.print("A mod 3 != 0 and A mod 10 == 0 ? ");
- if(a % 3 !=0 && a % 10 == 0)
- System.out.println("true");
- else
- System.out.println("false");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement