Question: In this lab you will practice prompting the user for multiple values, reading the values from the user / keyboard into variables, using if .

In this lab you will practice prompting the user for multiple values, reading the values from the user/keyboard into variables,
using if...else statements to compare the values entered by the user and write out the larger of the two. You will then
repeat the procedure for two strings. Be sure to read this lab thoroughly, especially the Hand-in Procedure.
Lab
Write a complete program that:
1. Prompts the user to enter a floating point number then reads a floating point number from the keyboard as a double.
2. Prompts the user to enter a second floating point number then reads a second floating point number from the keyboard
as a double.
3. Uses an if statement to compare the numbers from (1) and (2) and write out to the display which is bigger.
4. Prompts the user to enter a string then reads a string from the keyboard.
5. Prompts the user to enter a second string then reads a second string from the keyboard.
6. Uses an if statement to compare the strings from (4) and (5) and write out to the display which is bigger.

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!