#include<iostream.h>
#include<conio.h>
class degree
{
private:
float d,r;
public:
void getdata(float x)
{
d=x;
r=0;
}
void convert()
{
r=d*180/3.1415;
}
void display()
{
cout<<r<<"radian ="<<d<<"degree";
}
};
int main()
{
degree A;
float x;
cout<<"enter degree :";
cin>>x;
A.getdata(x);
A.convert();
A.display();
getch();
return(0);
}
No comments:
Post a Comment