Thursday, 21 July 2011

Program to implement inline function circlearea to prompt the user for the radius of a circle and to calculate and print the area of a circle in C++

Do you like this post?
#include
#include
#include
#define PI 3.14159
inline float circlearea(float r)
{
float area;
area=PI*r*r;
return(area);
}
void main()
{
float radius;
clrscr();
cout<<"Enter radius of circle"; cin>>radius;
cout<<"Area of circle is = "< getch();
}

No comments:

Post a Comment