Area and Circumference of a Circle Program in C
WAP to calculate the area and circumference of a circle.
#include<stdio.h>
/*3. WAP to calculate the area and circumference of a circle. */
void main()
{
float r,c,a;
printf("Enter radius=");
scanf("%f",&r);
float pi=3.14;
c=2*pi*r;
a=pi*r*r;
printf("\nCircumference of a circle=%f",c);
printf("\nArea of a circle=%f",a);
}
Output:
Enter radius=7 Circumference of a circle=43.960003 Area of a circle=153.860016c language tutorial learn c language study c language