Write a program to calculate the BMI of a person using the
formula BMI = weight/height2.
Answers were Sorted based on User's Feedback
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 |
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 |
Where the memory to the static variables is allocated?
What is a volatile variable in c++?
Describe the process of creation and destruction of a derived class object?
What is auto used for in c++?
What is pointer with example?
template<class T, class X> class Obj { T my_t; X my_x; public: Obj(T t, X x) : my_t(t), my_x(x) { } }; Referring to the sample code above, which one of the following is a valid conversion operator for the type T? a) T operator T () { return my_t; } b) T operator(T) const { return my_t; } c) operator(T) { return my_t; } d) T operator T (const Obj &obj) { return obj.my_t; } e) operator T () const { return my_t; }
To which numbering system can the binary number 1101100100111100 be easily converted to?
Write about the retrieval of n number of objects during the process of delete[]p?
What is double in c++?
what is the use of Namespace in c++.
What are pointers, when declared, intialized to a) NULL b) Newly allocated memory c) Nothing. Its random
Why c++ is called oop?