C program to find volume of a sphere.

 

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

Related Post

Leave a Reply

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


The reCAPTCHA verification period has expired. Please reload the page.