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 is the purpose of the "delete" operator?

0 Answers  


How do you declare A pointer to function which receives an int pointer and returns a float pointer

0 Answers  


What is an iterator?

0 Answers  


What is object oriented programming (oop)?

0 Answers  


What ANSI C++ function clears the screen a) clrscr() b) clear() c) Its not defined by the ANSI C++ standard

0 Answers  






What is difference between malloc()/free() and new/delete?

0 Answers  


What does new return if there is insufficient memory to make your new object?

0 Answers  


Is c++ fully object oriented?

0 Answers  


How many ways are there to initialize an int with a constant?

1 Answers  


How do I write a c++ program?

0 Answers  


What is a tuple c++?

0 Answers  


Compare compile time polymorphism and Runtime polymorphism

1 Answers  


Categories