This is supposed to be programming project in one of the C books.
I wrote a program and got 63.44 as an answer for the given values.
Can anyone calculate this to double check if my program is correct?
>>366204
I think you forgot to divide by two? Try solving the bottom equation for t, then plugging that into the top equation and solving for a. You'll end up with a textbook equation that they didn't give you because it'd make the problem too easy, I suppose. +1 for not forgetting to convert to m/s, which is the error I expected to find.
>>366214
Just to be clear: your answer for acceleration is exactly double what it should be.
>>366204
t = v/a inserted in second equation:
s = 0.5 a (v/a)^2 = v^2/(2a)
a = v^2/(2s)
v = 278 km/h = 77.22222 m/s
s = 94 m
a = 31.72 m/(s^2)
>>366413
>>366214
thanks guys
>>366512
You should be returning 0.
>>366531
Right, thanks
>>366204
Dump that book and read K&R C, it's the definitive guide.