Ferix

RSOJava#5

Nov 25th, 2020
460
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class MyClass {
  4.     public static void main(String args[]) {
  5.        
  6.         Scanner input = new Scanner(System.in);
  7.        
  8.         int input1 = input.nextInt();
  9.         int input2 = input.nextInt();
  10.         int input3 = input.nextInt();
  11.        
  12.         if(input1 % input2 == 0){
  13.             System.out.println(input1 + " is divisible by " + input2);
  14.         }else{
  15.             System.out.println(input1 + " is not divisible by " + input2);
  16.         }
  17.         if(input1 % input3 == 0){
  18.             System.out.println(input1 + " is divisible by " + input3);
  19.         }else{
  20.             System.out.println(input1 + " is not divisible by " + input3);
  21.         }
  22.    
  23.     }
  24. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×