Write a program to find the area of circle using user defined function

//this is a program to find the area of circle using user defined function
#include<stdio.h>
#include<conio.h>
void area();
void main()
{
area();

getch();
}
void area()
{
float area,rad;

printf("\n\nEnter the radius of the circle: ");
scanf("%f",&rad);

area=3.14*rad*rad;

printf("\n\nArea=%f",area);
}

Previous
Next Post »