Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write a program that first displays messages asking for a person\'s name, weight

ID: 3563911 • Letter: W

Question

write a program that first displays messages asking for a person's name, weight in pounds, and weight in inches. the program that calculates and displays a person's body mass index (BMI) together with the name. The BMI is calculated using the following formula: BMI=703*weight/height^2 write a program that first displays messages asking for a person's name, weight in pounds, and weight in inches. the program that calculates and displays a person's body mass index (BMI) together with the name. The BMI is calculated using the following formula: BMI=703*weight/height^2

Explanation / Answer

#include <stdio.h>

int main(){

char *name;

float height , weight;

printf("Please enter your name:");

scanf("%s" , name);

printf("Please enter your height:");

scanf("%f" , &height);

printf("Please enter your weight:");

scanf("%f" , &weight);

float  BMI = 703*weight / (height*height);

printf("your name: %s" , name);

printf("your BMI: %f" , BMI);

return 0;

}