|
From: Scott <fre...@ve...> - 2005-10-31 02:51:04
|
Okay thanks to everyone, i'm looking into POW
and the maths.h.
This code example gives me Power as 1.38
And i wanted it to equal 330 HP....
Iv'e tried a few variations, but still no luck!
#include <stdio.h>
#include <math.h>
#define time 5.825
/*The formula is: hp =3D weight / (ET / 5.825)3*/
main()
{
float Weight, ET, Power;
printf("Enter the weight in pounds : ");
scanf("%f",&Weight);
printf("Enter the ET in Seconds : ");
scanf("%f",&ET);
Power =3D Weight/ET/pow(time,3);
printf("Power EST is %3.2f",Power);
}
I'm sure it's just a matter of the POW being
in the wrong place...?
Cheers,
Scott. |