In: Computer Science
JAVA CODE :
import java.util.*;
public class Calculate
{
public static void Addition(int a, int b) // addtion
{
System.out.println("Addition : " + (a + b));
}
public static void Subtraction(int a, int b) // subtraction
{
System.out.println("Subtraction : " + (a - b));
}
public static void Multiplication(int a, int b) //
Multiplication
{
System.out.println("Multiplication : " + (a * b));
}
public static void Division(int a, int b) // Division
{
System.out.println("Division : " + (a / b));
}
public static void main(String[] args) {
Scanner s = new
Scanner(System.in);
System.out.print("Enter the value
of a and b : ");
int a = s.nextInt(); // read
a
int b = s.nextInt(); // read
b
Addition(a, b);
Subtraction(a, b);
Multiplication(a, b);
Division(a, b);
}
}
OUTPUT :