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

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions