Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c code for question Problem 1: In this problenn, we are interested in finding the Body Mass Index (BMII) that be connguted bosed on the

c code for question
image text in transcribed
Problem 1: In this problenn, we are interested in finding the Body Mass Index (BMII) that be connguted bosed on the height h in cm and the wright w in kg as follows: B.Mt=h(cm)h(cm)u(kg)10000 Write a C prograta that: 1. Scans froan the toser one real number (floaf) indicating the wright w in kg and one integer indicating the beight h in cm. 2. Cherks if w and h are positive and display an errot message and exit in case any of the bumbers is acro or begative as shown in the sample input/output 1 and 2 below: 3. Compute the BMIt and display a messige indicating if the persota is " usderwelght" (i.e.: BMII 24.9 ) as shown in the sample ingut/outpat 3 and 4 belos. Sample input/outpat I: Enter the veight in kg : 10 Enter the height in co: 5 Error: The veight and height should not be negative or equal to 0 . Sample input/output 2: Enter the veight in kg : 0 Enter the height in cm : 165 Error: The veight and height should not be negative or equal to 0 . Sample input/output 3: Enter the weight in kg : 65.5 Enter the height in ce: 157 BMI =26,6 ww 0 0verwedght Sample imput/output 4: Enter the weight in kg: 50 Enter the height in ca: 170 BNI =17.3m= Underveight - Sabnuit your solution in a file called "Problemf,e

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

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions