Make a program which displays a different message depending on the age given. Here are the possible responses:
You will need to use a function. In main(), input the name
and age. Then pass the age to a function called
age_message(), which should have if
statements
inside it to return a single string, but not display it. Then,
once back in main() display the string that was returned.
Hey, what's your name? Billy_Corgan Ok, Billy_Corgan, how old are you? 17 You can't vote, Billy_Corgan.
©2013 Graham Mitchell
This assignment is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.