Code is copied!
Program to print the sum, difference, product & division of the two numbers JAVA
Write a Program to print the sum, difference, product & division of the two numbers.
import java.util.*; class cal { public static void main(String args[]) { Scanner sc = new Scanner (System.in); int a = sc.nextInt(); int b = sc.nextInt(); int sum,prod,div,diff; sum = a + b; div = a/b; prod = a * b; diff = a-b; System.out.println("Sum=" +sum + " " + "Difference=" + diff + " "+ "Division=" +div + " " + "Product=" +prod); } }