Question: I need the header files to use ONLY. #include stdafx.h #include #include Open Visual Studio on your PC and select to create a New Project
I need the header files to use ONLY. #include "stdafx.h" #include
Open Visual Studio on your PC and select to create a New Project, name the new project BMI , and set the Location tosave to your flashdrive to your folder called MyProgramProjects .
Using the Scale program as a guide, write a new program that contains a function called CalculateBMI to compute the Body Mass Index for a person by completing the following steps:
Write code to ask the user to enter his heightInInches and his weightInPounds. Save these values as doubles.
Write code to call a function CalculateBMI and send it these 2 double values. Store the result that will be returned by this function to a double called BodyMassIndex.
Now write the function CalculateBMI that takes in these 2 double values. It should convert the person's height to meters (heightInMeters = heightInInches/39.37). Next it should convert the person's weight to kilograms (weightInKilograms = weightInPounds/2.2). Now it should calculate the person's BMI with the following formula: BMI = weightInKilograms / pow(heightInMeters,2). Finally, it should return this result back to the main program.
The main program should print a message to the screen "The Body Mass Index for this person is: " along with with the result.
Don't forget to add a line at the very top: #include "stdafx.h" (needed for Visual Studio software). Save your program and Build it.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
