xxxxxxxxxx
#include <stdio.h>
#define PI 3.142
int main(){
float R, A;
printf("Enter the radius: \n");
scanf("%f", &R);
A = PI * R * R;
printf("Area is: %f\n", A);
}
xxxxxxxxxx
#include<stdio.h>
int main()
{
double R, A;
scanf("%lf", &R);
A = 3.14159 * R * R;
printf("A=%.4lf\n", A);
return 0;
}