#include <iostream>
#include<string>
using namespace std;
class Cricket
{public:
string playername;
int jerseynum;
int no_of_innings;
int counter;
Cricket(int n,string c,int no)
{
jerseynum=n;
no_of_innings=no;
playername=c;
}
void show()
{
cout<<"Jersey Num:"<<jerseynum<<endl;
cout<<"Name of the Player:"<<playername<<endl;
cout<<"No of Innings Played:"<<no_of_innings<<endl;
}
void count()
{
cout<<counter;
}
};
int main() {
int a,b,h,d;
string e,f;
cin>>a>>e>>b;
cin>>h>>f>>d;
Cricket lib1(a,e,b);
Cricket lib2=Cricket(h,f,d);
lib1.show();
lib2.show();
return 0;
}
#include<string>
using namespace std;
class Cricket
{public:
string playername;
int jerseynum;
int no_of_innings;
int counter;
Cricket(int n,string c,int no)
{
jerseynum=n;
no_of_innings=no;
playername=c;
}
void show()
{
cout<<"Jersey Num:"<<jerseynum<<endl;
cout<<"Name of the Player:"<<playername<<endl;
cout<<"No of Innings Played:"<<no_of_innings<<endl;
}
void count()
{
cout<<counter;
}
};
int main() {
int a,b,h,d;
string e,f;
cin>>a>>e>>b;
cin>>h>>f>>d;
Cricket lib1(a,e,b);
Cricket lib2=Cricket(h,f,d);
lib1.show();
lib2.show();
return 0;
}
No comments:
Post a Comment