#include<conio.h>
class
test
{
private:
int
x,y,z;
public:
void
getdata()
{
cout<<"
enter value of x=";
cin>>x;
cout<<"
enter value of y=";
cin>>y;
}
void
putdata()
{
z=x+y;
cout<<"z="<<z<<"\n";
}
};
void main()
{
clrscr();
test
u;
u.getdata();
u.putdata();
getch();
}
No comments :
Post a Comment