PROGRAM ON MACROS WITH ARGUMENTS
#define PI 3.142857
#define AREA(x)PI*x*x
void main()
{
float r,a;
printf("Enter
radius of a circle");
scanf("%f",&r);
a=AREA(r);
printf("AREA
of the circle=%f",a);
}
OUTPUT
Enter radius of a
circle 45
AREA of the circle6364.285645
No comments:
Post a Comment