60 337
Assignments Done
98%
Successfully Done
In April 2018

Answer to Question #18537 in Java | JSP | JSF for zyrus santillan

Question #18537
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
Expert's answer
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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions