Answered step by step
Verified Expert Solution
Link Copied!

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 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

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

Oracle Databases On The Web Learn To Create Web Pages That Interface With Database Engines

Authors: Robert Papaj, Donald Burleson

11th Edition

1576100995, 978-1576100998

More Books

Students also viewed these Databases questions

Question

Create a workflow analysis.

Answered: 1 week ago