Solution :-
import java.util.*;
class add
{
public static void main(String args[])
{
Scanner in = new Scanner(System.in);
System.out.println(“Enter the first number :- “);
int a = in.nextInt();
System.out.println(“Enter the Second number :- “);
int b = in.nextInt();
int add = a+b;
int sub = a-b;
int mul = a*b;
int div = a/b;
int mod = a%b;
System.out.println(“The Sum of 2 number is :- “+add);
System.out.println(“The Sub of 2 number is :- “+sub);
System.out.println(“The mul of 2 number is :- “+mul);
System.out.println(“The div of 2 number is :- “+div);
System.out.println(“The mod of 2 number is :- “+mod);
}
}
Output :-