#include <iostream>
#include <string.h>
using namespace std;
class Student{
private:
char name[255];
int score[10];
public:
Student(char n[ ],int s[ ]){
__________________;
for(int i=0;i<
#include <iostream>
#include <string.h>
using namespace std;
class Student{
private:
char name[255];
int score[10];
public:
Student(char n[ ],int s[ ]){
__________________;
for(int i=0;i<10;i++){
score[i]=s[i];
}
}
void Show( ){
int sum=0;
for(int i=0;i<10;i++){
__________________;
}
cout<<″名字:″< < name<<″,平均成绩:″<<sum/10;
}
};
void main( ){
char name[255];
int score[10];
cout<<″姓名:″;cin>>name;
for(int i=0;i<10;i++){
cout<<″成绩″<<i+l<<″:″;
cin>>score[i];
}
Student s(name,score);
s.Show( );
}
第1空:STRCPY(NAME,N)
第2空:SUM=SUM+SCORE[I]
扫描二维码免费使用微信小程序搜题/刷题/查看解析。
版权声明:本文由翰林刷题小程序授权发布,如需转载请注明出处。