Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- #include <math.h>
- using namespace std;
- struct student
- {
- string imie,nazwisko,kierunek;
- int rok;
- };
- student czytaj(void);
- int main(int argc, char *argv[])
- {
- student st;
- st=czytaj();
- cout <<"Imie:" << st.imie << endl;
- cout <<"Nazwisko:" << st.nazwisko << endl;
- cout <<"Kierunek:" << st.kierunek << endl;
- cout <<"Rok:" << st.rok << endl;
- system("PAUSE");
- return EXIT_SUCCESS;
- }
- student czytaj(void)
- {
- student st;
- cout << "Podaj imie" << endl;
- cin >> st.imie;
- cout << "Podaj nazwisko" << endl;
- cin >> st.nazwisko;
- cout << "Podaj kierunek studiow" << endl;
- cin >> st.kierunek;
- cout << "Podaj rok studiow" << endl;
- cin >> st.rok;
- return st;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement