//Program to find out the area of circle by using macro
#include<stdio.h>
#include<conio.h>
#define pi 3.1416//macro
int main()
{
float area, radius;
clrscr();
printf("Enter the radius of circle whose area to be calculated\n");
scanf("%f",&radius);
area=pi*radius*radius;
printf("\nThe Area of the Circle is = %f",area);
getch();
return 0;
}
To Run this Program Copy it in text editor and save as .c
Then double click on it and then it will get opened in your compiler.
Click on run.
#include<stdio.h>
#include<conio.h>
#define pi 3.1416//macro
int main()
{
float area, radius;
clrscr();
printf("Enter the radius of circle whose area to be calculated\n");
scanf("%f",&radius);
area=pi*radius*radius;
printf("\nThe Area of the Circle is = %f",area);
getch();
return 0;
}
To Run this Program Copy it in text editor and save as .c
Then double click on it and then it will get opened in your compiler.
Click on run.