This is C++ language! Assignment 4 (10 points): Making Decisions Your goal is to take in data from the user, write equat

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

This is C++ language! Assignment 4 (10 points): Making Decisions Your goal is to take in data from the user, write equat

Post by answerhappygod »

This is C++ language!
Assignment 4 (10 points): MakingDecisions
Your goal is to take in data from the user, write equations,using conditionals, and output results.
Ask the user for their age and save this in a variable.Determine if the user is old enough to drive a car (at least 16years old), vote (at least 18 years old), or gamble (at least 21years old). Output the conditions that match the criteria. If theuser is not able to do any of the activities based on their age,let them know that they are not old enough for the activity and howmany years they must wait before they can do thatactivity.
Example Output:Age: 7You have 9 years until you are old enough to drive a car.You have 11 years until you are old enough to vote.You have 14 years until you are old enough to gamble.
Example Output:Age: 19You are old enough to drive a car.You are old enough to vote.You have 2 years until you are old enough to gamble.
Example Output:Age: 35You are old enough to drive a car.You are old enough to vote.You are old enough to gamble.
Test your program several times using different input to ensurethat it is working properly.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply