# Roller coaster ride height Create a program that prompts the passenger for their height to determine if they can safely ride the roller coaster. Print the appropriate messages according to their height. Please see the sample outputs below to guide the design of your program. C++ ## Safe ``` You must be at least 55 inches to safely ride the TuffyTwister. Please enter your height in inches: 72 Congratulations! You are tall enough to ride! ``` ## Unsafe ``` You must be at least 55 inches to safely ride the TuffyTwister. Please enter your height in inches: 50
# Roller coaster ride height
Create a
## Safe
```
You must be at least 55 inches to safely ride the TuffyTwister.
Please enter your height in inches: 72
Congratulations! You are tall enough to ride!
```
## Unsafe
```
You must be at least 55 inches to safely ride the TuffyTwister.
Please enter your height in inches: 50
Safety is our first priority. Unfortunately, we can't let you ride yet.
The if-else statement also tests the condition.
It executes if block if condition is true otherwise else block is executed.
if(condition)
{
//code if condition is true
}
else
{
//code if condition is false
}
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images