What's wrong with this CODE (SIMPSTAT)

Here is my code: https://www.codechef.com/viewsolution/15510067
The expected output is also produced. The output format is also correct. Please help me with the code.
Thanks a lot!

I think you should use double instead of float for 6 digit precision

@nikesh_04 Thanks! But then why wouldn’t float work! I am printing it with 6-digit precision!