// ConsoleApplication4.cpp: определяет точку входа для консольного приложения.//#include "stdafx.h"#include <iostream>#include <string>using namespace std;class stud {public:void setname(string sname){name = sname;}string getname(){return name;}string getsurname(){return surname;}void setsurname(string ssurname){surname = ssurname;}void setscore(int sc[]){for (int i = 0; i<10; i++) score[i] = sc[i];}float getsr(){float sum = 0;for (int i = 0; i<10; i++) sum += (float)score[i];return sum / 10;}void showmyself(){cout << "Студент: " << name << " " << surname << endl;cout << "Имеет 10 текущих оценок: ";for (int i = 0; i < 10; i++) cout << score[i] << " ";cout << "" << endl;cout << "Его средний балл: " << getsr() << endl;}private:string name;string surname;int score[10];};int main(int acgc, char* argv[]){setlocale(LC_ALL, "rus");stud student1;int score[10];string name, surname;cout << "Введите имя студента: "<<endl;getline(cin, name);cout << "Введите фамилию студента: " << endl;getline(cin, surname);cout << "введите 10 текущих оценок через пробел: " << endl;for (int i = 0; i<10; i++) cin >> score[i];student1.setname(name);student1.setsurname(surname);student1.setscore(score);student1.showmyself();system("pause");}