Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  123
Language: C/C++
Code:
#include<iostream.h>
#include<conio.h>
class circle
{
    float r,x,y;
    public:
    circle()
    {}
    void input()
    {
        cout<<"enter the radius of the circle:";
        cin>>r;
        cout<<"enetr the x co ordinate of the centre:";
        cin>>x;
        cout<<"enter the y co ordinate of the centre:";
        cin>>y;
    }
    void outpu()
    {
        cout<<"radius of the circle:"<<r;
        cout<<"enter x coordinate of the centre:"<<x;
        cout<<"enter y coordinate of the centre:"<<y;
    }
    float circumference()
    {
        return(2*3.14*r);
    }
    float area()
    {
        return(3.14*r*r);
    }
};
void main()
{
    clrscr();
    circle c;
    c.input();
    c.output();
    cout<<"circumference of a circle is:"<<c.corcumference();
    cout<<"area of a circle is:"<<c.area();
}
Comments: