Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions

Question

How do books become world of wonder?

Answered: 1 week ago

Question

4. What decision would you make and why?

Answered: 1 week ago

Question

3. Review the evidence. Do you believe the testimony presented?

Answered: 1 week ago

Question

1. What are the marketing implications of this situation?

Answered: 1 week ago