Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- #include <iomanip>
- using namespace std;
- const int MAX=100;
- struct tessera
- {
- string nome;
- string cognome;
- int anno_nascita;
- string squadra;
- long int n_tessera;
- };
- int i;
- int main(int argc, char *argv[])
- {
- tessera T[MAX];
- int d;
- cout<<"Inserire numero giocatori"<<endl;
- cin>>d;
- for (i=0;i<d;i++)
- {
- tessera calciatore;
- cout<<"Inserire Nome Calciatore"<<endl;
- cin>>T[i].nome;
- cout<<"Inserire Cognome Calciatore"<<endl;
- cin>>T[i].cognome;
- cout<<"Inserire Anno di Nascita"<<endl;
- cin>>T[i].anno_nascita;
- cout<<"Inserire N* Tessera"<<endl;
- cin>>T[i].n_tessera;
- }
- for (i=0;i<d;i++)
- {
- cout<<endl;
- cout<<endl;
- cout<<endl;
- cout<<setw(10)<<T[i].nome<<endl;
- cout<<setw(10)<<T[i].cognome<<endl;
- cout<<setw(10)<<T[i].anno_nascita<<endl;
- cout<<setw(10)<<T[i].n_tessera<<endl;
- cout<<endl;
- cout<<endl;
- }
- system("PAUSE");
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment