Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you pass a vector to a function?

936


what is multi-threading in C++?

1030


What's c++ used for?

1078


how can i access a direct (absolute, not the offset) memory address? here is what i tried: wrote a program that ask's for an address from the user, creates a FAR pointer to that adress and shows it. then the user can increment/decrement the value in that address by pressing p(inc+) and m(dec-). NOW, i compiled that program and opened it twice (in 2 different windows) and gave twice the same address to it. now look what happen - if i change the value in one "window" of the program, it DOES NOT change in the other! even if they point to the same address in the memory! here is the code snippet: //------------------------------------------------------ #include //INCLUDE EVERY KNOWN HEADER FILE #include //FOR ANY CASE... #include #include #include main() { int far *ptr; //FAR POINTER!!! long address; char key=0; //A KEY FROM THE KEYBOARD int temp=0; clrscr(); cout<<"Enter Address:"; cin>>hex>>address; //GETS THE ADDRESS clrscr(); (long)ptr=address; temp=*ptr; //PUTS THE ADDRESS IN THE PTR cout<<"["<

2391


Out of fgets() and gets() which function is safe to use?

1095


Is c++ used anymore?

1060


In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h

1177


What is an adjust field format flag?

1085


Will a catch statement catch a derived exception if it is looking for the base class?

979


How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?

1050


What is the difference between *p++ and (*p)++ ?

1321


What is a friend function in c++?

1540


Define a nested class.

1045


What is a down cast?

1075


Show the declaration for a pointer to function returning long and taking an integer parameter.

1097