HOME

Saturday, April 18, 2015

C PROGRAM USING MACRO TO FIND AREA OF CIRCLE

#include<stdio.h>
#include<conio.h>
#define pie 3.14
#define circle(pie,r) (pie*r*r)
void main()
{
    float r,a;
    printf("enter the radius:\t");
    scanf("%f",&r);
    a=circle(pie,r);
    printf("the area of circle is %f",a);
getch();
}

No comments:

Post a Comment