Question: Design a program that prompts the user to enter his or her age and first initial. Include code that checks for input failure in case
Design a program that prompts the user to enter his or her age and first initial. Include code that checks for input failure in case the user enters character data for numeric data. If input failure occurs, display a message and return the value 1 from your main function. If no input failure occurs, display a message that echoes the data entered.
example:
output.
Please enter your age and first initial: 19 J
Your age is 19 and your initial is J.
Please enter your age and first initial: J 19
You did not enter your age followed by your initial.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
