C program to find the volume of a cone.

 

01  #include <stdio.h>
02
03 int main()
04 {
05 float r,h;
06 float volume;
07
08 printf("Enter radius of the cone : ");
09 scanf("%f", &r);
10
11 printf("Enter height of the cone : ");
12 scanf("%f", &h);
13
14 volume = (3.14*r*r*h)/3;
15
16 printf("nVolume of Cone is : %.2f", volume);
17 return 0;
18 }
 
 OUTPUT:
Enter radius of the cone : 5
Enter height of the cone : 8

Volume of cone is : 209.33

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *