/ Operators / artithmetic_operations.java
artithmetic_operations.java
 1  import java.util.Scanner;
 2  
 3  public class artithmetic_operations {
 4    public static void main(String[] args) {
 5      Scanner sc = new Scanner(System.in);
 6  
 7      int a, b, sum, diff, prod, quo, rem;
 8  
 9      System.out.println("Enter the numbers: ");
10      a = sc.nextInt();
11      b = sc.nextInt();
12  
13  //    sum = a+b;
14  //    diff = a-b;
15  //    prod = a*b;
16  //    quo = a/b;
17  //    rem = a%b;
18  
19      System.out.println("Sum: " + (a+b) + "\nDifference: " + (a-b) + "\nProduct: " + (a*b) + "\nQuotient: " + (a/b) + 
20          "\nRemainder: " + (a%b));
21    }
22  }