Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Prompt the user to enter the first letter of the color of a cylinder. Then use a switch statement, output the contents of the

image text in transcribed
1. Prompt the user to enter the first letter of the color of a cylinder. Then use a switch statement, output the contents of the cylinder to the console screen, using this table It contains this.... User inputs... For a cylinder of this color... O" or "o" Orange B" or 'bBrown "Y" or "y" Yellow G or "g"Green Carbon Monoxide Hydrogen Oxygen 2. Write a program that calculates the user's body mass index(BMI) and categorizes it as underweight, normal, overweight or obese base on the table below: Weight Status BMI Below 18.5 Underweight 18.5-24.9 Normal 25.0-29.9 Overweight 30.0 and above Obese Prompt the user to enter the person's weight in pounds and the person's height in inches. Use the following formula to calculate the BMI Output the calculated BMI to the console window and the determined "weight status" based on that number. Test with 200 pounds and 72 inches You must use a if/else ifelse structure for this

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

Be familiar with the five basic ways to manage demand.

Answered: 1 week ago