Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C please! Hi am stuck on this and need aid please and thank you! Problem 3 Write some code that calculates the body mass

In C please! Hi am stuck on this and need aid please and thank you!

image text in transcribed

Problem 3 Write some code that calculates the body mass index (BMI). The BMI can be calculated as follows using the formula BMI weightIn Pounds x 703 heightInInches x heightInInches You are going to ask the user for some input. You will ask for weightIn Pounds and heightInInches. Both variables are float type. Make sure to follow this output to receive full points. Any differ- ences will cause points to be deducted. Your output result should only display up to three decimal places. Note: Assume the total height is input. Example, 5 feet and 6 inches would result in 66 inches as the input. You do not need to worry about the denominator being 0 or negative values. We have not discussed conditions. Enter the weight in pounds: 37.25 Enter the total height in inches: 41.5 BMI = 15.205 Figure 3: Output for question 3. The output must match exactly to receive credit. This includes white space and new lines. Problem 4 Write some code inside the main function that calculates the volume of a cone. The formula for calculating the volume of a cone is as follows xaxr2 x The value of n = 3.14159. Make sure to declare pi as a constant variable or else points will be deducted. The graders will be checking for this and not the script! You should have the following exact output in your code for the script to give you credit. Display the result up to four decimal places. Be very careful with this problem. Some students may run into small errors do to loss of information. Make sure 1/3 is 0.3 repeating and not just 0. All variables are type double. You do not need to worry about negative values. We have not discussed conditions yet. Enter the radius: 10.0 Enter the height: 565.0 The volume of the cone is 59166.6117 Figure 4: Output for question 4. The output must match exactly to receive credit. This includes white space and new lines

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

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions