Using C++ Develop an algorithm that would solve the problem. Your algorithm has
ID: 3825923 • Letter: U
Question
Using C++ Develop an algorithm that would solve the problem. Your algorithm has to use at least one if-statement. Use pseudocode to describe your algorithm.You are not writing code for this algorithm. You are only creating the pseudocode for the algorithm.Given a user’s age, display a message that the user is a child if he or she is less than or equal to 12 years old, display a message that the user is a teenager if he or she is 13 to 18 years old, or display a message that the user is an adult if he or she is 19 years old or older.
Explanation / Answer
PROCEDURE age
age=user_age;
if user_age<=12
then "user is a child"
else if user_age>=13 OR <=18
then "user is an teenager"
else "user is an adult"
END if
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.