Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. Scanner s = new Scanner(System.in);
  2. System.out.println("enter number 1");
  3. int one = s.nextInt();
  4. System.out.println("enter number 2");
  5. int two = s.nextInt();
  6. addition(one, two);
  7. division(one, two);
  8.  
  9. }
  10.  
  11.  
  12. private static void addition(int num1, int num2) {
  13. int answer = num1*num2;
  14. System.out.println(answer);
  15. }
  16.  
  17. private static void division(int num1, int num2) {
  18. double answer = num1/num2;
  19. System.out.println(answer);
  20.  
  21.  
  22.  
  23.  
  24. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement