#include <iostream>
#include <math.h>
#include <cmath>
using namespace std;
class Person
{
string name;
int date;
public:
void setName(string name)
{
this->name=name;
}
void setDate(int date)
{
this->date=date;
}
string getName()
{
return this->name;
}
int getDate()
{
return this->date;
}
Person()
{
}
Person(string name, int date)
{
this->name=name;
this->date=date;
}
Person ( Person &coppy)
{
this->name = coppy.getName();
this->date = coppy.getDate();
}
int age()
{
this->date=date;
int wiek = 0;
int rok = 2018;
wiek = rok - date;
if(wiek < 0 || wiek>100)
{
cout<<"Taka osoba nie zyje :) "<<endl;
}
else
{
cout<<"Wiek wynosi : "<<wiek<<endl;
}
return 0;
}
void show()
{
cout<<this->name<<endl;
cout<<this->date<<endl;
}
};
int main()
{
/*
Person osoba;
osoba.setName("Daniel");
osoba.setDate(1991);
osoba.show();
Person osoba2;
osoba2.setName("Konrad");
osoba2.setDate(1791);
osoba2.show();
osoba2.age();
Person osoba3(osoba2);
daniel.show();
Person osoba4(osoba2);
Person osoba5(osoba2);
*/
string name;
int date;
const int n = 5;
Person tab[n];
for(int i =0 ;i<n;i++)
{
cin>>name;
cin>>date;
tab[i].setName(name);
tab[i].setDate(date);
}
for(int i =0 ;i<n;i++)
{
cout<<tab[i].getName();
cout<<tab[i].getDate();
}
return 0;
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}