#include <iostream.h>
#include <conio.h>
void main()
{
double carea(float r)
{
double ar = (double) ( 3.14 * r * r );
return ar;
}
float rad;
cout<< " \n Enter Radius :";
cin >>rad;
double area = carea(rad);
cout<<"\n The area of the circle of radius " << rad << " unit is " << area << "sq. unit ";
getch();
}
No comments:
Post a Comment