Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "iostream"
- using namespace std;
- struct student {
- char *familiya;
- int god, kurs;
- int mas[6];
- };
- struct student s[5];
- void main()
- {
- setlocale(LC_ALL, "Rus");
- for (int i = 0; i<5; i++)
- {
- cout << "Введите фамилию студента" << endl;
- s[i].familiya = new char[15];
- cin >> s[i].familiya;
- cout << "Введите год рождения студента" << endl;
- cin >> s[i].god;
- cout << "Введите курс, на котором учится студент" << endl;
- cin >> s[i].kurs;
- cout << "Введите 6 оценок студента" << endl;
- for (int j = 0; j<6; j++)
- {
- cin >> s[i].mas[j];
- }
- }
- for (int i = 0; i < 5; i++) {
- for (int j = 0; j < 5; j++) {
- if (s[i].mas[j] == 2)
- cout << "Неудовлетворительная оценка есть у студента " << s[i].familiya << endl;
- }
- }
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement