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

Popular posts from this blog

Design and Develop a java program to read marks of a student and print the total and average of marks using scanner class.

Write a Java program to convert seconds to hour, minute and seconds.

Write a Java program to print the ascii value of a given character.