Bismillahir Rahmanir Rahim
Now I'm writing a program to use class.if you have to face any problem any problem comment below.
Or you can contact our facebook group:
solution:
//iubatians.blogspot.com
#include<iostream.h>
class io
{
public:
void input_part()
{
cout<<"Enter your data:"<<endl<<"_________________________"<<endl;
}
void output_part()
{
cout<<endl<<"Disply your input:"<<endl<<"Name\t\tId"<<endl<<"________________________"<<endl;
}
};
class rajib
{
char nr[30];
unsigned long int idr;
public:
void get()
{
cout<<"Enter name:";
cin>>nr;
cout<<"Enter your id:";
cin>>idr;
}
void disply()
{
cout<<"1."<<nr<<"\t\t"<<idr<<endl;
}
};
class tanjid
{
char nt[30];
unsigned long int idt;
public:
void get()
{
cout<<"Enter name:";
cin>>nt;
cout<<"Enter your id:";
cin>>idt;
}
void disply()
{
cout<<"2."<<nt<<"\t\t"<<idt<<endl;
}
};
class sojib
{
char ns[30];
unsigned long int ids;
public:
void get()
{
cout<<"Enter name:";
cin>>ns;
cout<<"Enter your id:";
cin>>ids;
}
void disply()
{
cout<<"3."<<ns<<"\t\t"<<ids<<endl;
}
};
void main()
{
io p;
rajib r;
tanjid t;
sojib s;
p.input_part();
r.get();
t.get();
s.get();
p.output_part();
r.disply();
t.disply();
s.disply();
}
#include<iostream.h>
class io
{
public:
void input_part()
{
cout<<"Enter your data:"<<endl<<"_________________________"<<endl;
}
void output_part()
{
cout<<endl<<"Disply your input:"<<endl<<"Name\t\tId"<<endl<<"________________________"<<endl;
}
};
class rajib
{
char nr[30];
unsigned long int idr;
public:
void get()
{
cout<<"Enter name:";
cin>>nr;
cout<<"Enter your id:";
cin>>idr;
}
void disply()
{
cout<<"1."<<nr<<"\t\t"<<idr<<endl;
}
};
class tanjid
{
char nt[30];
unsigned long int idt;
public:
void get()
{
cout<<"Enter name:";
cin>>nt;
cout<<"Enter your id:";
cin>>idt;
}
void disply()
{
cout<<"2."<<nt<<"\t\t"<<idt<<endl;
}
};
class sojib
{
char ns[30];
unsigned long int ids;
public:
void get()
{
cout<<"Enter name:";
cin>>ns;
cout<<"Enter your id:";
cin>>ids;
}
void disply()
{
cout<<"3."<<ns<<"\t\t"<<ids<<endl;
}
};
void main()
{
io p;
rajib r;
tanjid t;
sojib s;
p.input_part();
r.get();
t.get();
s.get();
p.output_part();
r.disply();
t.disply();
s.disply();
}