Header Ads

Header ADS

Solution of URI 1011::Sphere

Before seeing the solution make sure that you have tried enough. Don’t copy the whole code, just find out the logic. If you feel any problemyou will inform me by comment.




#include <stdio.h>
#include <math.h>
int  main ()
{
    double R;
    double pi=3.14159;
    double VOLUME;

    scanf("%lf",&R);

    VOLUME = ((4/3.0)*pi*(pow(R,3)));
    printf("VOLUME = %.3lf\n",VOLUME);

    return 0;
}

No comments

Theme images by konradlew. Powered by Blogger.