|
|
back to boardMaybe the problem is in acuracy... but I use pi=2.0*acosl(0.0)... Maybe it's printing DANGER! but I use if (result<99.995) printf("DANGER!\n"); Any ideas? Sorry, I've found my mistake :-[ Did you find your mistake? What is this? I have WA3 too... type = extended!!! I always use extended if real type is needed... Maybe test #3 is some special case? Distance is about 100 miles. Possibly, you make checking something like "distance < 100 then print "Dangerous!!!'". Instead, you should check not equality of number (dist < 100), but convert it into string, and then check that length(s) < 6 (it equals to condition s < '100.00') Thanks for help! But my mistake was in other... I've got AC finally try const double PI=acos(-1.0); and you will get AC |
|
|