Question: Lab 4 Work You always create a separate C + + file for each program you write in the lab. Write a C + +
Lab Work
You always create a separate file for each program you write in the lab.
Write a program that does the following:
a Create a file with the name problemcpp
b Prompt the user to enter a hurricane category number.
c Use a nested ifthenelse statement to print the wind speed of the hurricane category the user entered.
For a category hurricane, the wind speed is
For a category hurricane, the wind speed is
For a category hurricane, the wind speed is
For a category hurricane, the wind speed is
For a category hurricane, the wind speed exceeds mph
Sample run of the program:
Enter a category of hurricane through :
The wind speed is
Write a program that does the following:
a Create a file with the name problemcpp
b A shoe store gives a price reduction on any shoes with an original price of $ or more.
c Prompt the user to enter an original price.
d Use an ifthenelse statement to determine if the original price qualifies for the reduction or not.
e If the original price qualifies for the reduction, then compute and print the reduced price, else print that
the original price does not qualify for the discount, along with the original price.
Sample run of the program:
What is the original price?
The reduced price is $
Sample run of the program:
What is the original price?
That does not qualify for a discount. The price is $
Write a program that does the following:
a Create a C file with the name problemcpp
b A store gives a discounted version of an item's price.
c If the item's original price is at most $ then the discount is else the discount is
d Prompt the user to enter an item's original price.
e Print the discount percentage used as well as the item's discounted price.
Sample run of the program:
What is the item's original price?
The item qualifies for a discount. The item's discounted price is $
Sample run of the program:
What is the original price?
The item qualifies for a discount. The item's discounted price is $
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
