Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream> //exercise 1
- #include <string> //create structure STUDENT, which includes full name, birth's year, marks for session
- #include <vector> //output - names of students, which average mark is higher than predetermined number
- #include <fstream>
- using namespace std;
- struct Student
- {
- Student(){};
- ~Student(){};
- string surname, name, patrinymic_name;
- int birth_year;
- vector<int> marks;
- Student(string surname, string name, string patrinymic_name, int birth_year) : surname(surname), name(name), patrinymic_name(patrinymic_name), birth_year(birth_year) {};
- };
- int main()
- {
- ifstream in("input.txt");
- ofstream out("output.txt");
- vector<Student> student;
- int n;
- cout << "Enter the border: ";
- cin >> n;
- while(in.peek() != EOF)
- {
- string surname, name, patrinymic_name;
- int birth_year;
- in >> surname;
- in >> name;
- in >> patrinymic_name;
- in >> birth_year;
- student.push_back(Student());
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment