# thanks very much guys, girls works now

This topic is 4218 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

any help would be greatly appreciated if anyone can help me with the compile errors in this code. please. Next time ill post the errors it works now thanks.

// pg 107 exercise 2

#include <iostream>
#include <cmath>

using namespace std;

float FeetToInches(int,int);
float PoundsToKilos(int);
float ConvertBmi(float,float);

int main();
{

int feet;
int inches;
int pounds;

cin >> feet;
cin >> inches;
cin >> pounds;

float inMeters = FeetToInches(inches,feet);
float inKilos = PoundsToKilos(pounds);
float bmi = ConvertBmi(inKilos,inMeters);

return 0;
}

float FeetToInches(int inch,int ft)
{
const int toInches = 12;
int totalInches = inch + (ft* toInches); //convert to total inches
const float toMeters = 0.0254;             //convert totalinch to kilo
float Meters = totalInches * toMeters;
return Meters;
}

float PoundsToKilos(int lbs)
{
const float ToKilos = 2.2;           // pounds to kilos
float converted = lbs / 2.2 ;
return converted;
}

float ConvertBmi(float kilo,float mtrs) // calculate bmi
{
float bmi = kilo / sqrt(mtrs);
return bmi;
}


[Edited by - derekpainter1 on July 3, 2006 4:50:49 PM]

##### Share on other sites
What errors are you getting?

##### Share on other sites
int main();
{

(the semicolon shouldn't be there)

Also, you have a few conversion warnings that you may want to address. Next time, please post the errors you are getting.

jfl.

##### Share on other sites
also FeetToInches actually converts to meters (no logic error, just bad name)

##### Share on other sites
"thanks very much guys, girls works now"

What an interesting description of a problem.

When someone helps you, you make another post to notify him that the problem is fixed and thank him. You don't edit your original post and change the title of the thread,thus making it useless for everyone else. Geez.

##### Share on other sites
Quote:
 Original post by mikeman"thanks very much guys, girls works now"What an interesting description of a problem.When someone helps you, you make another post to notify him that the problem is fixed and thank him. You don't edit your original post and change the title of the thread,thus making it useless for everyone else. Geez.

Only in the U.S [grin]

##### Share on other sites
At first I thought this was another girl thread but then I was like, "Why isn't it in the lounge???". Lol. It's just that I interpreted that "girls" work now, and before the help they didn't.