Write a Java program to print the sum (addition), multiply, subtract, divide and remainder of two numbers.
/*Write a Java program to print the sum (addition), multiply, subtract, divide
and remainder of two numbers.*/
class Second
{
public static void main ( String arg[] )
{
int a , b;
a = 10;
b = 5;
System.out.println("A : "+ a +"\nB : " + b );
System.out.println("Addition : " + ( a + b ) );
System.out.println("Multiplication : " + ( a * b ) );
System.out.println("Substaction : " + ( a - b ) );
System.out.println("Division :" + ( a / b ) );
System.out.println("Remainder : " + ( a % b ) );
}
}
More Information on our channel Programmer Community
please like , share and subscribe to get notifications of new videos....
To understand this program video will coming soon on our you tube channel
Comments
Post a Comment