#include #include #include using namespace std; ifstream pes("input.txt"); ofstream sep("output.txt"); struct student { string Last_name, First_name, Second_name; int gr; int otc[5]; int key = 0; }; void puzir(student *lox, int n) { student temp; int i, j; for (i = 0; i < n - 1; i++) for (j = n - 1; j > i; j--) if (lox[j].key < lox[j - 1].key) { temp = lox[i]; lox[j] = lox[j - 1]; lox[j - 1] = temp; } } int main() { int n; student lox[3]; while (pes.peek() != EOF) { pes >> lox->Last_name; pes >> lox->First_name; pes >> lox->Second_name; pes >> lox->gr; for (int i = 0; i < 5; i++) pes >> lox->otc[i]; } /*for (int i = 0; i < 3; i++) puzir(lox, 3);*/ //system("pause"); return 0; }