The link to my program is http://ideone.com/AwTzyO.
Whwn I use ‘double’ instead of ‘float’ on spoj my solution is accepted but when I use datatype of ‘float’ for ans ;spoj shows wrong answer…Please tell me why is it happening so?
Thanks a lot for the answer…but still I have one confusion…using float is not much appropriate(but using float is not compleely wrong) Then why spoj shows wrong answer for it?