#include <iostream>
#include <string.h>
using namespace std;
struct Agenda{
string nome;
int cod;
};
int main()
{
Agenda a[3];
for(int i=0;i<3;i++){
cout << "Nome: ";
getline(cin, a[i].nome);
cout << "Cód: ";
cin >> a[i].cod;
cin.ignore();
}
for(int i=0;i<3;i++){
cout << a[i].nome << "\t" << a[i].cod << "\n";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nLmg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKc3RydWN0IEFnZW5kYXsKICAgIHN0cmluZyBub21lOwogICAgaW50IGNvZDsKfTsKCmludCBtYWluKCkKewogICAgQWdlbmRhIGFbM107CgogICAgZm9yKGludCBpPTA7aTwzO2krKyl7CiAgICAgICAgY291dCA8PCAiTm9tZTogIjsKICAgICAgICBnZXRsaW5lKGNpbiwgYVtpXS5ub21lKTsKICAgICAgICBjb3V0IDw8ICJDw7NkOiAiOwogICAgICAgIGNpbiA+PiBhW2ldLmNvZDsKICAgICAgICBjaW4uaWdub3JlKCk7CiAgICB9CgogICAgZm9yKGludCBpPTA7aTwzO2krKyl7CiAgICAgICAgY291dCA8PCBhW2ldLm5vbWUgPDwgIlx0IiA8PCBhW2ldLmNvZCA8PCAiXG4iOwogICAgfQoKCgogICAgcmV0dXJuIDA7Cn0K