don't getting correct volume of a sphere from my C code? -


i have started learning c programming.i have question.

i wanna calculate volume of sphere radius.my code is:

enter image description here

but not giving me correct ans 1523.result 14797486080.000 correct ans 14797486501.627.where problem?

i found problem here https://www.urionlinejudge.com.br/judge/en/problems/view/1011

your computation performed in double , converted on assignment float, loose precision. should declare q double.

also if concerned precision, should use better approximation of π.


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -