Java program for Addition,Division,Subtraction and Multiplication

This program will perform simple mathematical operations like addition, subtraction and multiplication.

class Ab
{
public static void main(String args[])
{
int a,b,c,d,e;
a=100;
b=50;
c=a+b;
d=a-b;
e=a*b;
System.out.println(“additon=” + c  +”nsubtraction=” +d +”nmultiplication=” +e);
/*System.out.println(“addition=” +c);
System.out.println(“subtraction=” +d);
System.out.println(“multiplication=” +e);*/
}
}

Add Comment