Quote:
your function returns a float but f is a double, and you have 'float' in front of the call to the function, can you do that?not sure about the scanf thing,
does
scanf("%f%f%f%f%f", &a, &b, &c, &d, &e);
not do what you want?hope this is helpful.
I tried to put them all in one scanf but I think I had commas between the %f's...would that be a problem? I changed the f to a double just to see if that would fix the 'type' error.
Quote:
I assume they are trying to typecast this. If so, this is what you want:f = (float) avarage( a, b, c, d, e );
On a side note, you, the original poster, never actually use the variable 'f', so what's the point?
Quzah.
Thanks Quzah, I just tried to typecast it your way and it works, I didn't know about having the float in brackets and I realize that I have yet to use f, sorry about that but I posted this before supper and checked after the movie so I am going to go and try everything now but I just wanted to post the latest stuff I had. But now I have used f, and it returns an average and works just fine, thanks and I guess I am on to the next question :p