daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Mar 14th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "stdafx.h"
  2. #include <string>
  3. #include <cstring>
  4. #include <iostream>
  5. using namespace std;
  6.  
  7. struct base
  8. {
  9.     string fio;
  10.     int numberGroup;
  11.     int marks[30];
  12. };
  13.  
  14.  
  15. int main()
  16. {
  17.     const int n = 2;
  18.     base a[n];
  19.     for (int i = 0; i < n; i++)
  20.     {
  21.         getline (cin,a[i].fio);
  22.         cin >> a[i].numberGroup;
  23.         for (int j = 0; j < 4; j++)
  24.             cin >> a[i].marks[j];
  25.     }
  26.     for (int i = 0; i < n; i++)
  27.     {
  28.         for (int j = 0; j < 4; j++)
  29.             if (a[i].marks[j] > 2)
  30.                 cout << a[i].fio << " " << a[i].numberGroup << endl;
  31.  
  32.     }
  33.     system("pause");
  34.    
  35.     return 0;
  36. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top