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

write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;

0 Answers  


Is c++ used anymore?

0 Answers  


What do you mean by inheritance in c++? Explain its types.

0 Answers  


How long it will take to learn c++?

0 Answers  


How do you initialize a class member, class x { const int i; };

8 Answers   emc2,






What do you understand by a pure virtual member function?

0 Answers  


What is OOPs

12 Answers   CA,


What is the Maximum Size that an Array can hold?

55 Answers   Adobe, FutureSoft, HCL, Infosys, Satyam, TCS, Wipro,


What is split a string in c++?

0 Answers  


What are the syntactic rules to be avoid ambiguity in multiple inheritance?

0 Answers  


What is c++ and its features?

0 Answers  


What parameter does the constructor to an ofstream object take?

0 Answers  


Categories