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

Explain stack unwinding.

0 Answers  


What is the type of 'this' pointer?

0 Answers  


What is c++ namespace?

0 Answers  


What is the difference between a baller and a reference in C++?

0 Answers  


What is a class definition?

0 Answers  


What is multithreading and what is its use?Whats are multithreading techniques used in C++?

1 Answers  


can anybody please tell me how to write a program in c++,without using semicolon(;)

6 Answers   NIIT,


Why do we use classes in programming?

0 Answers  


total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.

0 Answers  


What are the basic data types used in c++?

0 Answers  


Define inline function

1 Answers  


What are references in c++? What is a local reference?

0 Answers  


Categories