#include <iostream>
#include <string>
#include <map>
using namespace std;
class FichaInscricao {
public :
string Nome;
string Cpf;
string Logradouro;
string Bairro;
string Cidade;
string Estado;
string Email;
string Telefone;
double SalarioFamiliar = 0 ;
int QuantidadePessoas = 0 ;
double RendaPerCapita = 0 ;
void Inserir( ) {
cout << "Nome: " ;
cin >> Nome;
cout << "CPF: " ;
cin >> Cpf;
cout << "Logradouro: " ;
cin >> Logradouro;
cout << "Bairro: " ;
cin >> Bairro;
cout << "Cidade: " ;
cin >> Cidade;
cout << "Estado: " ;
cin >> Estado;
cout << "Email: " ;
cin >> Email;
cout << "Telefone: " ;
cin >> Telefone;
cout << "Salario Total da Familia: " ;
cin >> SalarioFamiliar;
cout << "Quantidade de pessoas na sua casa: " ;
cin >> QuantidadePessoas;
RendaPerCapita = SalarioFamiliar / QuantidadePessoas;
}
} ;
int main( ) {
map< string, FichaInscricao> fichario;
int op = 1 ;
while ( op == 1 ) {
FichaInscricao ficha;
ficha.Inserir ( ) ;
fichario.emplace ( ficha.Nome , ficha) ;
cout << "\n Novo cadastro?\n "
<< "1 - SIM\n "
<< "0 - NAO\n " ;
cin >> op;
}
for ( const auto & ficha : fichario) {
std:: cout << ficha.first << " => " << ficha.second .Cpf << '\n ' ;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8bWFwPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgRmljaGFJbnNjcmljYW8gewpwdWJsaWM6CiAgICBzdHJpbmcgTm9tZTsKICAgIHN0cmluZyBDcGY7CiAgICBzdHJpbmcgTG9ncmFkb3VybzsKICAgIHN0cmluZyBCYWlycm87CiAgICBzdHJpbmcgQ2lkYWRlOwogICAgc3RyaW5nIEVzdGFkbzsKICAgIHN0cmluZyBFbWFpbDsKICAgIHN0cmluZyBUZWxlZm9uZTsKICAgIGRvdWJsZSBTYWxhcmlvRmFtaWxpYXIgPSAwOwogICAgaW50IFF1YW50aWRhZGVQZXNzb2FzID0gMDsKICAgIGRvdWJsZSBSZW5kYVBlckNhcGl0YSA9IDA7CgogICAgdm9pZCBJbnNlcmlyKCkgewogICAgICAgIGNvdXQgPDwgIk5vbWU6ICI7CiAgICAgICAgY2luID4+IE5vbWU7CiAgICAgICAgY291dCA8PCAiQ1BGOiAiOwogICAgICAgIGNpbiA+PiBDcGY7CiAgICAgICAgY291dCA8PCAiTG9ncmFkb3VybzogIjsKICAgICAgICBjaW4gPj4gTG9ncmFkb3VybzsKICAgICAgICBjb3V0IDw8ICJCYWlycm86ICI7CiAgICAgICAgY2luID4+IEJhaXJybzsKICAgICAgICBjb3V0IDw8ICJDaWRhZGU6ICI7CiAgICAgICAgY2luID4+IENpZGFkZTsKICAgICAgICBjb3V0IDw8ICJFc3RhZG86ICI7CiAgICAgICAgY2luID4+IEVzdGFkbzsKICAgICAgICBjb3V0IDw8ICJFbWFpbDogIjsKICAgICAgICBjaW4gPj4gRW1haWw7CiAgICAgICAgY291dCA8PCAiVGVsZWZvbmU6ICI7CiAgICAgICAgY2luID4+IFRlbGVmb25lOwogICAgICAgIGNvdXQgPDwgIlNhbGFyaW8gVG90YWwgZGEgRmFtaWxpYTogIjsKICAgICAgICBjaW4gPj4gU2FsYXJpb0ZhbWlsaWFyOwogICAgICAgIGNvdXQgPDwgIlF1YW50aWRhZGUgZGUgcGVzc29hcyBuYSBzdWEgY2FzYTogIjsKICAgICAgICBjaW4gPj4gUXVhbnRpZGFkZVBlc3NvYXM7CiAgICAgICAgUmVuZGFQZXJDYXBpdGEgPSBTYWxhcmlvRmFtaWxpYXIgLyBRdWFudGlkYWRlUGVzc29hczsKICAgIH0KfTsKCmludCBtYWluKCkgewogICAgbWFwPHN0cmluZywgRmljaGFJbnNjcmljYW8+IGZpY2hhcmlvOwogICAgaW50IG9wID0gMTsKICAgIHdoaWxlIChvcCA9PSAxKSAgewogICAgICAgIEZpY2hhSW5zY3JpY2FvIGZpY2hhOwogICAgICAgIGZpY2hhLkluc2VyaXIoKTsKICAgICAgICBmaWNoYXJpby5lbXBsYWNlKGZpY2hhLk5vbWUsIGZpY2hhKTsKICAgICAgICBjb3V0IDw8ICJcbk5vdm8gY2FkYXN0cm8/XG4iCiAgICAgICAgICAgICA8PCAiMSAtIFNJTVxuIgogICAgICAgICAgICAgPDwgIjAgLSBOQU9cbiI7CiAgICAgICAgY2luID4+IG9wOwogICAgfQogICAgZm9yIChjb25zdCBhdXRvICZmaWNoYSA6IGZpY2hhcmlvKSB7CiAgICAgICAgc3RkOjpjb3V0IDw8IGZpY2hhLmZpcnN0IDw8ICIgPT4gIiA8PCBmaWNoYS5zZWNvbmQuQ3BmIDw8ICdcbic7CiAgICB9Cn0=
stdin
TWFyaWEKMTIzNApSdWEKQ2VudHJvClMmYXRpbGRlO29QYXVsbwpTUApldUBtZXUuY29tCjEyMzQ1NgoxMDAKNAoxCkpvcyZlYWN1dGU7CjQzMjEKUnVhCkNlbnRybwpTJmF0aWxkZTtvUGF1bG8KU1AKZXVAbWV1LmNvbQoxMjM0NTYKMTAwCjQKMAo=
Maria
1234
Rua
Centro
SãoPaulo
SP
eu@meu.com
123456
100
4
1
José
4321
Rua
Centro
SãoPaulo
SP
eu@meu.com
123456
100
4
0