Pages

Write a program to calculate volum and area of sphere.

Wednesday, 8 May 2013

#include<stdio.h>
#include<conio.h>
int main()
{
    float r,v,area;
    printf("Enter the radius of the sphere\n ");
    scanf("%f", &r);
    area=4*3.14*r*r*r;
    v=(4/3.14)*3.14*r*r*r;
    printf("volume of the sphere=%f\n", v);
    printf("area of sphere=%f\n", area);
    getch();
    }
 

Search Box

Most Reading

Contact Form

Name

Email *

Message *