Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import java.lang.*;
- import java.io.*;
- import java.util.Scanner;
- /* Name of the class has to be "Main" only if the class is public. */
- class Ideone
- {
- public static void main (String[] args) throws java.lang.Exception
- {
- Scanner in = new Scanner(System.in);
- int a = in.nextInt();
- int b = in.nextInt();
- int c = in.nextInt();
- int sum;
- sum = a + b + c;
- if(sum % 3 == 0)
- {
- System.out.printf("The product of the numbers: %d \n", a * b * c);
- }
- else System.out.printf("The sum of the numbers is not divisible by 3");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement