Question: Question 4 : Write a Java program that reads from the user two integers and outputs their sum, difference, and product. Follow these steps: Import
Question :
Write a Java program that reads from the user two integers and outputs their sum, difference, and product. Follow these steps:
Import the Scanner class.
Create an object from the Scanner class.
Declare two variables of type int and name them num and num
Prompt the user to enter the first integer.
Prompt the user to enter the second integer.
Compute the sum, difference, and product of the two integers.
Display the result of the sum, difference, and product.
Your output should be like this:
Enter the first integer:
Enter the second integer:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
