Write a java source code that would compute the 4 arithmeti operators such as addition, subtraction,difference, and qoutient of the two given number. input the firrst number and second number named it as NUM1 and NUM2 and display the PRODUCT,DIFFERENCE,QUOTIENT, SUM of the two numbers
import java.util.Scanner;
public class Calc {
public static void main(String[] args) {
& Scanner scan = new Scanner(System.in);
& System.out.print("Input NUM1 :");
& int NUM1 = scan.nextInt();
& System.out.print("Input NUM2 :");
& int NUM2 = scan.nextInt();
& System.out.println("SUM = "+(NUM1+NUM2));
& System.out.println("DIFFERENCE = "+(NUM1-NUM2));
& System.out.println("QUOTIENT = " + (NUM1 / NUM2));
& System.out.println("PRODUCT = " + (NUM1 * NUM2));
&
}
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
JavaJSPJSF