Function #1: superman Parameters: height - an integer representing the user's height in inches Description: Write a function for the Superman ride at Six Flags that determines whether the user is taller than 4'8" so that he or she can ride a roller coaster. If the user's height, which is provided by the parameter height, is greater than or equal to the minimum height, print the string 'Have a great ride!'. Otherwise, print the string 'Sorry. You must be at least 4 feet 8 inches to ride.' Test Cases: >>>superman(30) Sorry. You must be at least 4 feet 8 inches to ride. >>>superman(70) Have a great ride!

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.2: Returning A Single Value
Problem 13E
icon
Related questions
Question

Function #1: superman Parameters: height - an integer representing the user's height in inches Description:

Write a function for the Superman ride at Six Flags that determines whether the user is taller than 4'8" so that he or she can ride a roller coaster. If the user's height, which is provided by the parameter height, is greater than or equal to the minimum height, print the string 'Have a great ride!'.

Otherwise, print the string 'Sorry. You must be at least 4 feet 8 inches to ride.' Test Cases:

>>>superman(30) Sorry. You must be at least 4 feet 8 inches to ride.

>>>superman(70)

Have a great ride!

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning