Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- struct Student {
- int indeks;
- char ime[50];
- char prezime[50];
- void input() {
- scanf("%d%s%s", &indeks, ime, prezime);
- }
- void print() {
- printf("Ime: %s\nPrezime: %s\nIndeks: %d\n", ime, prezime, indeks);
- }
- };
- int main() {
- int N;
- cin >> N;
- Student niza[N];
- for(int i = 0; i < N; i++) {
- niza[i].input();
- }
- for(int i = 0; i < N; i++) {
- niza[i].print();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement