Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started