Question: Create a C / C + + program that will prompt for various inputs and display the results specified below. Create a char variable named

Create a C/C++ program that will prompt for various inputs and display the results specified below.
Create a char variable named veteranStatus
Create an integer variable named myAge
Create a char variable named hasDriversLicense. Initialize this N.
Create a bool variable named hasBeenOutsideUSA
Prompt for veteranStatus expecting Y or N.
Prompt for your current age in years and store in the myAge variable.
Prompt for hasBeenOutsideUSA (input 1 for true or 0 for false)
Process the following:
a. If the veteranStatus variable is 'Y'- display "Thank you for your service". - Use the
toupper char function here
b. If myAge is greater than 15, Prompt for hasDriversLicense expecting Y or N. Only
prompt if age is greater than 15
c. If the hasDriversLicense variable is 'Y'- display "Don't text and drive".
d. If the myAge variable is greater than 18 or equals 18, display "You can open a Bank
Account".
e. If the myAge variable is greater than 65 or equals 65, display "You can take free
classes at TCC!".
f. If the hasBeenOutsideUSA is true and veteranStatus is 'Y'- display "Were you
stationed overseas?". ( This is not a prompt - just a message)
g. If the hasBeenOutsideUSA is true and veteranStatus is not 'Y'- display "Which
countries have you visited?." ( This is not a prompt - just a message)
5 Extra Credit : Combine steps 8f and 8g and code using only 1 comparison to the
hasBeenOutSideUSA variable.
Note - Use nested IFs as needed as this is the topic for this week. Do not use 'and' or 'or'
in conditions.
 Create a C/C++ program that will prompt for various inputs and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!