Write a C program to find the area of circle using preprocessor directives.
#include <stdio.h>
#define PI 3.142
int main(){
float rad, area;
printf("Radius: ");
scanf("%f", &rad);
area = PI * rad * rad;
printf("%f\n", area);
return 0;
}
Comments
Leave a comment