Advertisement
szanisz

Untitled

Nov 28th, 2015
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. struct hallgatok {
  4.     int matek, tesi, fizika;
  5.     char nev[30];
  6. };
  7. int main() {
  8.     setlocale(LC_ALL, "Hun");
  9.     int i;
  10.     hallgatok a[20];
  11.     for (i = 0; i < 20; i++) {
  12.         cout << "Adja meg a " << i + 1 << ".tanuló nevét" << endl;
  13.         cout << i + 1 << ".tanuló neve: ";
  14.         fflush(stdin);
  15.         cin.getline(a[i].nev, 30);
  16.         cout << endl;
  17.         cout << "Adja meg a " << i + 1 << ". tanuló matek jegyét" << endl;
  18.         cout << i + 1 << ".tanuló matekjegye: ";
  19.         cin >> a[i].matek;
  20.         cout << endl;
  21.     }
  22.     system("Pause");
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement