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 CC 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 or
Prompt for your current age in years and store in the myAge variable.
Prompt for hasBeenOutsideUSA input for true or 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 Prompt for hasDriversLicense expecting Y or N Only
prompt if age is greater than
c If the hasDriversLicense variable is display "Don't text and drive".
d If the myAge variable is greater than or equals display "You can open a Bank
Account".
e If the myAge variable is greater than or equals 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 display "Which
countries have you visited?." This is not a prompt just a message
Extra Credit : Combine steps and and code using only 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
