Thursday, July 28, 2011

Calculating circumstance and area of a circle

#include<stdio.h>
#define pi 3.14

void main()
{
float radius,area,circumstance;
clrscr();
printf("Enter radius of the circle : ");
scanf("%f",&radius);
area=pi*radius*radius;
circumstance=2*pi*radius;
printf("\nArea of the circle = %f",area);
printf("\nCircumstance of the circle = %f",circumstance);
getch();
}

0 comments:

Post a Comment