You are on page 1of 1

#include<stdio.

h>
#include<conio.h>
#include<iostream.h>
class first
{
protected:
int a,b;
public:
first()
{
a=10;
b=20;
}
first(int x,int y)
{
a=x;
b=y;
}
void display()
{
cout<<"A="<<a<<endl;
cout<<"B="<<b<<endl;
}
};
int main()
{
first ft();
first fs(30,40);
ft.display();
fs.display();
getch();
return 0;
}

You might also like