Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scanner s = new Scanner(System.in);
- System.out.println("enter number 1");
- int one = s.nextInt();
- System.out.println("enter number 2");
- int two = s.nextInt();
- addition(one, two);
- division(one, two);
- }
- private static void addition(int num1, int num2) {
- int answer = num1*num2;
- System.out.println(answer);
- }
- private static void division(int num1, int num2) {
- double answer = num1/num2;
- System.out.println(answer);
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement