Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Area of Circle in C++

// AREA OF THE CIRCLE

#include<iostream.h>
#include<conio.h>
#define PI 3.14159
class circle
{
float ar;
public:
void area(float r)
{

ar=PI * r * r;
cout<<"the area of the circle is:"<<ar;
}
};
void main()
{
circle c;
float r;
cout<<"Enter the radius:";
cin>>r;
c.area(r);
getch();
}