Write a program which includes two functions

Assignment Help C/C++ Programming
Reference no: EM132080158

You need help writing a BMI calculation C program that follows these guidlines. It must be a C program.

BMI Calculation:

One measurement of a person's fitness is their Body Mass Index. The United States Center for Disease Control uses this to classify people as normal, underweight, overweight, or obese, according to the following table:

BMI

Classification

Less than 18.5

Underweight

18.5 - less than 25

Normal

25.0 - less than 30

Overweight

30.0 and above

Obese

The formula that is used to calculate BMI is

BMI= (703xweight in pounds)/(height in inches)^2

You are to write a program which includes two functions:

A function (calculate_bmi), that takes as arguments a person's weight in pounds and height in inches (both doubles) and returns a bmi_index calculated with the above formula.

A function (print_bmi), that takes the value of the bmi and prints an appropriate message to the screen showing the bmi(using 1 decimal place) and the classification.

Your main will then

Ask the user for their weight and height.

Call the calculate_bmi function and store the result in a variable.

Call print_bmi function to output the results based on the calculated bmi. The function should tell the person how they are classified. You will be doing this through a series of nested if/else statements.

Reference no: EM132080158

Questions Cloud

What is the opportunity cost of investing in capital : What is the opportunity cost of investing in capital?
Mylie total utility from singing the same song : Mylie's total utility from singing the same song over and over is as shown in the table below.
What annual rate of return did she receive on her investment : At the end of 2 years, just after receiving the fourth dividend, sh esold the stock for $23 per share and paid a $58 brokerage commission from the proceeds
Calculate the derivative of the function : Need to use two different methods to find a root for an equation of the form f(x)=0, however you will be starting with ONE guess instead of two.
Write a program which includes two functions : The United States Center for Disease Control uses this to classify people as normal, underweight, overweight, or obese.
Increase in the quantity demanded : An "increase in the quantity demanded" means that a. the demand curve has shifted to the right
Draw a plan view of the front panel : ENGINEERING DESIGN - DESIGN PROJECT - Teesside University - An analogue/digital circuit trainer is required for open learning students to use to build circuits
Describe a competitive market : Identify whether or not each of the following scenarios describes a competitive market, along with the correct explanation of why or why not.
Demand schedule or law of demand : A graph showing the relationship between the price of a good and the amount that buyers are willing to and able to purchase at a variety of prices

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd