Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- struct struktura
- {
- int liczba;
- char slowo[10];
- };
- struktura tab[5];
- void wczytywanie (struct struktura*liczba, struct struktura*slowo)
- {
- cout << "Podaj liczbe i slowo: " << endl;
- for (int i = 0; i < 5; i++)
- {
- cout << "Liczba: "; cin>>tab[i].liczba;
- cout << "Slowo: "; cin >> tab[i].slowo;
- }
- }
- void wyswietlanie(struct struktura*liczba, struct struktura*slowo)
- {
- for (int i = 0; i < 5; i++)
- {
- cout << tab[i].liczba << endl;
- cout << tab[i].slowo << endl;
- }
- }
- int main ()
- {
- wczytywanie();
- wyswietlanie();
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement