Question: Lab 4 Work You always create a separate C + + file for each program you write in the lab. Write a C + +

Lab 4 Work
You always create a separate C++ file for each program you write in the lab.
Write a C++ program that does the following:
a. Create a C++ file with the name problem1.cpp.
b. Prompt the user to enter a hurricane category number.
c. Use a nested if-then-else statement to print the wind speed of the hurricane category the user entered.
For a category 1 hurricane, the wind speed is 74-95mph.
For a category 2 hurricane, the wind speed is 96-110mph.
For a category 3 hurricane, the wind speed is 111-130mph.
For a category 4 hurricane, the wind speed is 131-155mph.
For a category 5 hurricane, the wind speed exceeds 155 mph .
Sample run of the program:
Enter a category of hurricane (1 through 5): 3
The wind speed is 111-130mph.
Write a C++ program that does the following:
a. Create a C++ file with the name problem2.cpp.
b. A shoe store gives a 10% price reduction on any shoes with an original price of $125 or more.
c. Prompt the user to enter an original price.
d. Use an if-then-else 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? 130
The reduced price is $117.
Sample run of the program:
What is the original price? 90
That does not qualify for a discount. The price is $90.
Write a C++ program that does the following:
a. Create a C++ file with the name problem3.cpp.
b. A store gives a discounted version of an item's price.
c. If the item's original price is at most $100, then the discount is 20%, else the discount is 40%.
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? 80
The item qualifies for a 20% discount. The item's discounted price is $64.
Sample run of the program:
What is the original price? 150
The item qualifies for a 40% discount. The item's discounted price is $90.
Lab 4 Work You always create a separate C + +

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 Programming Questions!