Write a program to calculate the BMI of a person using the
formula BMI = weight/height2.

Answers were Sorted based on User's Feedback



Write a program to calculate the BMI of a person using the formula BMI = weight/height2...

Answer / g.durga

main()
{
float bmi;
int weight,height;
printf(enter weight and height");
scanf("%d%d",&weight,&height);
bmi=weight/height;
print("%f",bmi);
getch();
}

Is This Answer Correct ?    12 Yes 6 No

Write a program to calculate the BMI of a person using the formula BMI = weight/height2...

Answer / nitin kalambe

void main()
{
float BMI,weight,height;
cout<<"Enter you weight and height"<<endl;
cin>>weight>>height;
BMI=weight/height*height;
cout<<"Your BMI is "<<BMI;
getch();
}

Is This Answer Correct ?    7 Yes 6 No

Post New Answer

More C++ General Interview Questions

What does std :: flush do?

0 Answers  


Which software is used to run c++ program?

0 Answers  


Is arr and &arr are same expression for an array?

0 Answers  


Can a class be static in c++?

0 Answers  


What is nested class in c++?

0 Answers  






What are the differences between the function prototype and the function defi-nition?

0 Answers  


What is string in c++ programming?

0 Answers  


C is to C++ as 1 is to a) What the heck b) 2 c) 10

0 Answers  


What is the syntax for a for loop?

0 Answers  


Do vectors start at 0?

0 Answers  


What is meant by entry controlled loop? What all C++ loops are exit controlled?

0 Answers   TCS,


if there is binary tree which one is the easiest way to delete all child node?

1 Answers   Persistent,


Categories