How to write program for volume of cone

CODE




How to write program for volume of cone
//v=3.14*r*r*h/3

int main()
{
    float v,r,h;
    printf("\n enter the radius and height:");
    scanf("%f%f",&r,&h);
    v=3.14*r*r*h/3;
    printf("\n volume=%f",v);
}

Output:
Enter the radius and height:
3
6
 Volume=56.520000

How to write program for volume of cone How to write program for volume of cone Reviewed by Unknown on December 13, 2018 Rating: 5

No comments:

If you have any doubt or query ,comment below:

Programming copyright © 2018-19. Powered by Blogger.