You are on page 1of 1

#include<stdio.

h>
#define pi 3.14\\pre processor directive
float calarea(float radius)\\called function
{
float a=pi*radius*radius;\\local declarations
return(a);
}
int main ()
{
float r,a;\\local declaration
printf("enter the radius=");\\output function
scanf("%f",&r);\\input function
a=calarea(r);\\calling function
printf("\n area=%.2f",a);
return 0;
}

You might also like