Friday, November 15, 2013

C Program to find area and circumference of circle

#include<stdio.h>

int main()
{
int rad;
float PI=3.14,area,ci;
clrscr();

printf("\nEnter radius of circle: ");
scanf("%d",&rad);

area = PI * rad * rad;
printf("\nArea of circle : %f ",area);

ci = 2 * PI * rad;
printf("\nnCircumference : %f ",ci);

return(0);
}

Output :

Enter radius of a circle : 1
Area of circle : 3.140000
Circumference  : 6.280000
If you have any problem regarding any program, mail me at tanveersingh800@gmail.com

No comments:

Post a Comment