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 userkeyboard into variables,
using ifelse 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 Handin Procedure.
Lab
Write a complete program that:
Prompts the user to enter a floating point number then reads a floating point number from the keyboard as a double.
Prompts the user to enter a second floating point number then reads a second floating point number from the keyboard
as a double.
Uses an if statement to compare the numbers from and and write out to the display which is bigger.
Prompts the user to enter a string then reads a string from the keyboard.
Prompts the user to enter a second string then reads a second string from the keyboard.
Uses an if statement to compare the strings from and 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
