Question: We need to print out with a C + + cout statement which roller coaster a person can ride. Here are the requirements: The program
We need to print out with a C cout statement which roller coaster a person can ride.
Here are the requirements:
The program is to ask the user to input an age and a weight in pounds for the person about to ride the roller coaster. Extra credit if you do sophisticated error checking, like checking for negative numbers, or input that's not a number.
If a person is younger than or equal to years old and weights less than pounds print the following:
This person needs to ride the black roller coaster.
If a person is younger than or equal to years old and weights between and pounds including weighing exactly or pounds print the following:
This person needs to ride the green roller coaster.
If a person is younger than or equal to years old and weights more than pounds, print the following:
This person needs to ride the yellow roller coaster.
If a person is younger than or equal to years old but older than and weights less than pounds, print the following:
This person needs to ride the silver roller coaster.
If a person is younger than or equal to years old but older than and weights between and pounds including weighting exactly or pounds print
This person needs to ride the red roller coaster.
if a person is younger than or equal to years old but older than and weights more than pounds, print:
This person needs to ride the purple roller coaster.
Everyone else rides the pink roller coaster, print:
This person needs to ride the pink roller coaster. Make sure to make plenty of comments
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
