Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setDataTest(vector<Student> ¤tStudent, int count)
- {
- for (int i; i < count; i++)
- {
- currentStudent.push_back(new Student);
- }
- strcpy_s(currentStudent[0].name, "1");
- currentStudent[0].group = 1;
- currentStudent[0].score[0] = 5;
- currentStudent[0].score[1] = 5;
- currentStudent[0].score[2] = 5;
- currentStudent[0].score[3] = 5;
- currentStudent[0].score[4] = 5;
- //Средний балл студента 5
- strcpy_s(currentStudent[1].name, "2");
- currentStudent[1].group = 2;
- currentStudent[1].score[0] = 1;
- currentStudent[1].score[1] = 1;
- currentStudent[1].score[2] = 2;
- currentStudent[1].score[3] = 1;
- currentStudent[1].score[4] = 2;
- //Средний балл студента 1.4
- strcpy_s(currentStudent[2].name, "3");
- currentStudent[2].group = 3;
- currentStudent[2].score[0] = 4;
- currentStudent[2].score[1] = 4;
- currentStudent[2].score[2] = 5;
- currentStudent[2].score[3] = 4;
- currentStudent[2].score[4] = 5;
- //Средний балл студента 4.4
- }
- int main()
- {
- setlocale(LC_ALL, "Rus");
- int countOfStudent = 3;
- vector<Student> currentStudents;
- setDataTest(currentStudents, countOfStudent);
- cout << "Welcome to Online IDE!! Happy Coding :)";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement