#include<iostream.h>
#include<conio.h>
class test
{
int a,b;
public:
void get()
{
cin>>a>>b;
}
void put()
{
cout<<a<<endl<<b
}
int add(test ob1)
{
int p;
p=b+ob1.b;
return(p);
}
};
void main()
{
test ob1,ob,ob2;
ob.get();
ob1.get();
s=ob2.add(ob1);
cout<<s;
getch();
}
No comments:
Post a Comment