Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string.h>
- #include <cstdlib>
- using namespace std;
- struct osoba {
- string imie;
- string nazwisko;
- int wiek;
- };
- int main()
- {
- osoba uczniowie[5];
- for (int i = 0; i<5; i++)
- {
- cout << "Podaj imie ucznia numer " << i+1 << endl;
- cin >> uczniowie[i].imie;
- cout << "Podaj nazwisko ucznia numer " << i+1 << endl;
- cin >> uczniowie[i].nazwisko;
- cout << "Podaj wiek ucznia numer " << i+1 << endl;
- cin >> uczniowie[i].wiek;
- }
- for (int i = 0; i<5; i++)
- {
- cout << uczniowie[i].imie << " " << uczniowie[i].nazwisko << " " << uczniowie[i].wiek << endl;
- }
- system("pause >nul");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement