Question
Done in visual studio C++ Use C++ cout statements to ask the user to enter their age. Use C++ statements to read the input from
Done in visual studio
C++
Use C++ cout statements to ask the user to enter their age. Use C++ statements to read the input from the user. Do not accept an age less than 0 or greater than 120. (print an error message and re-prompt until you receive a valid age) Create a for loop that prints the even numbers 2 through 20. Create a variable calorieSum and initialize to 0. Read in calorie values from the user and add them to the calorieSum. Stop reading in calories when the calorieSum is greater than or equal to 2000. Verify that your program compiles and runs with no errors
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started