Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What are the best practices for managing a large software project?

Answered: 1 week ago

Question

How does clustering in unsupervised learning help in data analysis?

Answered: 1 week ago

Question

=+2 Why did OBI create Centers of Excellence?

Answered: 1 week ago