#include<stdio.h>
#include<conio.h>
#define PI 3.142 /* define value of PI */
void main() /*Main function started here*/
{
float r,a,c; /*Declaration of variable*/
clrscr(); /*Clear the console screen*/
printf("\nEnter the radius of circle:\t");
scanf("%f",&r);
a=PI*r*r; /*Calculating area */
printf("\nThe area of the circle:\t%f",a);
c=2*PI*r; /* Calculating circumference */
printf("\nThe circumference of the circle: %f",c);
getch();
}
0 Comments