Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <conio.h>
- #include <string>
- using namespace std;
- struct uczniowe
- {
- string Imie;
- string Nazwisko;
- int wiek;
- };
- int ilu;
- uczniowe* tab = new uczniowe[ilu];
- int main()
- {
- cout << "ile uczniów chcesz wypisać? " << endl;
- cin >> ilu;
- for (int i = 0; i < ilu; i++)
- {
- cout << "podaj imie" << endl;
- cin >> tab[i].Imie;
- cout << "podaj nazwisko" << endl;
- cin >> tab[i].Nazwisko;
- cout << "podaj wiek" << endl;
- cin >> tab[i].wiek;
- }
- for (int i = 0; i < ilu; i++)
- {
- cout << tab[i].Imie << endl;
- cout << tab[i].Nazwisko << endl;
- cout << tab[i].wiek << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement