‘C’ program to calculate area and circumference of a circle
C File =>
/* Write a ‘C’ program to calculate area and circumference of a circle. */
#include<stdio.h>
#define PI 3.142
int main()
{
int r;
printf("\n Enter radius : ");
scanf("%d",&r);
printf("\n Area of circle = %f",PI*r*r);
printf("\n Circumference of circle : %f",2*PI*r);
return 0;
}
Comments
Post a Comment
Please do not enter any spam link in message.