// program to get area of circle
#include<stdio.h>
#include<conio.h>
void main()
{
float radius;
float area;
printf(“enter radius of circle\n”);
scanf(“%f”,&radius);
area=3.14*r*r;
printf(“the area is=%f\n”,area);
getch();
}
we now use here define constant to do same
// program to get area of circle using 'define' constant(macro)
#include<stdio.h>
#include<conio.h>
#define pi 3.14
#define pi 3.14
void main()
{
float radius;
float area;
printf(“enter radius of circle\n”);
scanf(“%f”,&radius);
area=pi*r*r;
printf(“the area is=%f\n”,area);
getch();
}
after using 'define' with some values, further variables we do not declare as shown above. but we get same output.