Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in C++ that asks for your age in years, your weight in kilograms, and your height in centimeters and then tells you

Write a program in C++ that asks for your age in years, your weight in kilograms, and your height in centimeters and then tells you the following based on the answers provided: a) If you are old enough to drive; b) If you are in your twenties; c) If you are either younger than 22 and less than 65 kg or older than 26 and taller than 180 cm; d) If you are neither old enough to vote, nor tall enough to hit your head on a 150 cm door frame, nor the right weight to box in the 60-64 kg division (all or none).

Each letter is a single test that should lead to a printed statement indicating that the test was passed (e.g., You are old enough to drive.) or that the test was failed (e.g., You are not old enough to drive.).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions

Question

How to solve maths problems with examples

Answered: 1 week ago