Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class MyClass {
- public static void main(String args[]) {
- Scanner input = new Scanner(System.in);
- int input1 = input.nextInt();
- int input2 = input.nextInt();
- int input3 = input.nextInt();
- if(input1 % input2 == 0){
- System.out.println(input1 + " is divisible by " + input2);
- }else{
- System.out.println(input1 + " is not divisible by " + input2);
- }
- if(input1 % input3 == 0){
- System.out.println(input1 + " is divisible by " + input3);
- }else{
- System.out.println(input1 + " is not divisible by " + input3);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment