Write a C program to calculate area of circle using #define.
#include <stdio.h>
#include <conio.h>
#define PI 3.141
int main()
{
float radius, area;
printf("Enter radius of circle\n");
scanf("%f", & radius);
area = PI * radius * radius;
printf("Area of circle : %0.4f\n", area);
getch();
return 0;
}
Output
Enter radius of circle
67
Area of circle : 14099.9492