Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started