Question: Program # 1 : Write a Java program that performs the following tasks: * Allows the user to input 4 integers from the keyboard. *

Program #1: Write a Java program that performs the following tasks:
* Allows the user to input 4 integers from the keyboard.
* Multiplies the first two integers together.
* Multiplies the second two integers together.
* Prints the two products in ascending order:
* If the products are the same, then print it once and state that the products are the same.
Runs of the program should look like the following:
jGRASP exec: java Program_1_Smith
Input first integer: 2
Input second integer: 3
Input third integer: 4
Input fourth integer: 5
Products in ascending order: 620
jGRASP: operation complete.
jGRASP exec: java Program_1_Smith
Input first integer: 4
Input second integer: 5
Input third integer: 2
Input fourth integer: 3
Products in ascending order: 620
jGRASP: operation complete.
jGRASP exec: java Program_1_Smith
Input first integer: 4
Input second integer: 5
Input third integer: 5
Input fourth integer: 4
Products in ascending order: 20
jGRASP: operation complete.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!