josiftepe

Untitled

Nov 15th, 2020
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. // korisnikot ni vnesuva eden broj n, i treba da vneseme za n studenti nivnoto ime, prezime, broj_na_indeks i prosek
  5. struct student{
  6.     string ime;
  7.     string prezime;
  8.     int broj_na_indeks;
  9.     double prosek;
  10.    
  11. };
  12.  
  13. int main()
  14. {
  15.     student S;
  16.     cin >> S.ime;
  17.     cin >> S.prezime;
  18.     cin >> S.broj_na_indeks;
  19.     cin >> S.prosek;
  20.     cout << S.ime << " " << S.prezime << " " << S.broj_na_indeks << " " << S.prosek << endl;
  21.     return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment