What's wrong with this CODE (SIMPSTAT)

Here is my code: CodeChef: Practical coding for everyone
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!