Program in C to find the area of circle using macro with argument
#include<stdio.h> #include<conio.h> #define AREA(x) 22.0/7.0*x*x int main() { float r1,r2,area; printf("Enter 1st radius of circle :-"); scanf("%f",&r1); area=AREA(r1); printf("Area of circle =%.2f",area); printf("\nEnter 2st radius of circle :-"); scanf("%f",&r2); area=AREA(r2); printf("Area of circle =%.2f",area); return 0; }Output:-
0 Comments