Write a program To accept two numbers and perform all five arithmetic operations(+,-,*,/,%).
Answers
Answered by
3
Answer:
class abc
{
public static void main (String args [])
{
Scanner sc=new Scanner (System.in);
System.out.println("Enter 2 Numbers");
int n1=sc.nextInt();
int n2=sc.nextInt();
int a=n1+n2;
int s=n1-n2;
int m=n1*n2;
int d=n1/n2;
int r=n1%n2;
System.out.println("sum"+a);
System.out.println("Subtraction"+s);
System.out.println("Multiplication"+m);
System.out.println("division"+d);
System.out.println("remainder"+r);
}
}
Please Subscribe my Youtube Channel Study To Study ICSE-Swapnil Mehta for more Java Programs
Hope this will help you
Please mark me as brainlist :)
Similar questions