Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are to write a short program asking the user to input a single character. Specifically, your prompt should be to ask the user to

image text in transcribed
image text in transcribed
You are to write a short program asking the user to input a single character. Specifically, your prompt should be to ask the user to input a vowel - A, E, I, O or U. (We will not use Y). Your program should then determine if they did indeed type in a vowel (upper or lower case is acceptable for user input for the vowel). You should use data type char for input! If they did, you print a short message thanking them for following directions. If they did NOT input a vowel, you print out a short message telling them that they did NOT follow the instructions. You should use the switch statement construct to solve this problem. It is worth 10 points. For 5 extra additional points (extra credit), your program should determine if the user input a special character which include the following: ! " #$%&'()*+,-./ if they did not input a special character listed above, your program should determine if they input a space, or a numeric digit 0 through 9, or an alphabet character other than a vowel. There are MANY more special characters than the ones I listed above, but I only want you to check those as they fall in the ASCII range together. HINT: Look at Chapter 10 sections 10.1 and 10.2 to help as well with this. Sample output is shown below Please enter a vowel - A, E, I, O, or u please e Thank you. I see that you entered an E Thank you for using my vowel checking program! Please enter a vowel - A, E, I, O, or U please A Thank you. I see that you entered an A Thank you for using my vowel checking program! Please enter a vowel - A, 2, 1, 0, oz U please Wo11, I see that you did not follow ny instructions. I so that you entered a numerie digit Thank you for uning sy vowel checking program || please enter a vowel - A, E, I, O, or w please 11, 1 ... that you did not follow my instructions. 1 so that you entered special character Thank you for using my vowel checking program

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

Recommended Textbook for

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions