5 I 6. Due date: 12-March Q1. Write a program that calculates the users body mass index(BMI) and categorizes it as underweight, normal, overweight or obese, based on it following table from United States Centers for Disease Control: BMI Weight Status Underweight Normal Below 18.5 18.5-24.9 25.0-29.9 Overweight 30.0 and above Obese To calculate BMI based on weight in pounds(wt Ib) and height in inches(ht_in), use this formula: 703 wt lb Ht in Prompt the user to enter weight in pounds and height in inches. Q2. Write a program that reports the contents of a compressed gas cylinder based on the first letter of the cylinder's color. The program input is a character representing the observed color of the cylinder: Tor "y" for yellow, "O" or "o" for orange, and so on. Cylinder colors and associated contents are as follows: Orange ammonia Brown carbon monoxide Yellow hydrogen Green Il eubbcollab.com is sharing your screen. Stop sharing Hide
5 I 6. Due date: 12-March Q1. Write a program that calculates the users body mass index(BMI) and categorizes it as underweight, normal, overweight or obese, based on it following table from United States Centers for Disease Control: BMI Weight Status Underweight Normal Below 18.5 18.5-24.9 25.0-29.9 Overweight 30.0 and above Obese To calculate BMI based on weight in pounds(wt Ib) and height in inches(ht_in), use this formula: 703 wt lb Ht in Prompt the user to enter weight in pounds and height in inches. Q2. Write a program that reports the contents of a compressed gas cylinder based on the first letter of the cylinder's color. The program input is a character representing the observed color of the cylinder: Tor "y" for yellow, "O" or "o" for orange, and so on. Cylinder colors and associated contents are as follows: Orange ammonia Brown carbon monoxide Yellow hydrogen Green Il eubbcollab.com is sharing your screen. Stop sharing Hide
Chapter6: Looping
Section: Chapter Questions
Problem 14PE
Related questions
Question

Transcribed Image Text:Font
Paragraph
Styles
2
Due date: 12-March
Q1. Write a program that calculates the users body mass index(BMI) and categorizes it as underweight,
normal, overweight or obese, based on it following table from United States Centers for Disease Control:
BMI
Weight Status
Underweight
Below 18.5
18.5-24.9
Normal
25.0-29.9
Overweight
30.0 and above
Obese
To calculate BMI based on weight in pounds(wt Ib) and height in inches(ht_in), use this formula:
703 wt lb
Ht in
Prompt the user to enter weight in pounds and height in inches.
Q2. Write a program that reports the contents of a compressed gas cylinder based on the first letter of
the cylinder's color. The program input is a character representing the observed color of the cylinder:
or "y" for yellow, "O" or "o" for orange, and so on. Cylinder colors and associated contents are as
follows:
Orange
ammonia
Brown
carbon monoxide
Yellow
hydrogen
Green
I| eu.bbcollab.com is sharing your screen.
Stop sharing
Hide
nglish (United States)

Transcribed Image Text:日、
Q Search
Font
Paragraph
Styles
2 3.. I
To calculate BMI based on weight in pounds(wt lb) and height in inches(ht_in), use this formula:
703 wt lb
Ht_in
Prompt the user to enter weight in pounds and height in inches.
Q2. Write a program that reports the contents of a compressed-gas cylinder based on the first letter of
the cylinder's color. The program input is a character representing the observed color of the cylinder:
"Y" or "y" for yellow, "O" or "o" for orange, and so on. Cylinder colors and associated contents are as
follows:
Orange
ammonia
Brown
carbon monoxide
Yellow
hydrogen
Green
oxygen
Your program should respond to input of a letter other than the first letters of the given colors with the
message, Contents unknown.(Use switch case)
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 7 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT

C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage

EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT

C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage

C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning

EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT

Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,