#include
class sum{
int x,y,z;
public:
sum()
{
x=10;
y=20;
cout<<"sum="<
sum(int p,int q)
{
x=p;
y=q;
cout<<"sum="<
sum(int r,int s,int t)
{
x=r;
y=s;
z=t;
cout<<"sum="<
};
void main()
{
clrscr();
sum o1;
sum o2(1,2);
sum o3(4,5,6);
getch();
}
OUTPUT:
Sum=30
Sum=3
Sum=15
No comments:
Post a Comment