4.simple calculation in java
class calculate
{
public static void main(String arg[])
{
int a = 10, b = 5;
System.out.println("A = " + a);
System.out.println("B = " + b);
int c = a + b;
System.out.println(" Addition = " + c);
c = a - b;
System.out.println(" Substraction = " + c);
c = a * b;
System.out.println(" Multiplication = " + c);
c = a / b;
System.out.println(" Division = " + c);
}
}
Comments
Post a Comment