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 |
Why is main an int?
1.what is the difference between software & package &application.
What is the type of 'this' pointer?
Write a function that swaps the values of two integers, using int* as the argument type?
What issue do auto_ptr objects address?
can any one help to find a specific string between html tags which is changed to a sting.. weather.html looks (for location) is <location>somewhere</location> #include <iostream> #include <fstream> #include <string> using namespace std; string find_field(string myPage,string); int main (void) { string page, line, location, temperature; ifstream inputFile("weather.xml"); while(getline(inputFile, line)) { page.append(line); line.erase(); } // Now page is a string that contains the whole xml page // Here you need to write something that finds and // extracts location and temperature from the XML // data in the string page and stores them in // the strings location and temperature respectively location=find_field(page,"location"); temperature=find_field(page,"temp_c"); cout << "Location: "<<location << endl; cout << "Temperature: " << temperature << endl; system("pause"); } string find_field(string myPage,string find_string){ int temp=myPage.find(find_string); if(temp!=string::npos) { cout << "Match found at " << temp << endl; } return "found?"; } ///
write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num
What are libraries in c++?
Why is it called c++?
What is the use of vtable?
What is the last index number in an array of 100 characters a) 100 b) 99 c) 101
When does a name clash occur in c++?