(c++)N人の学生がおり、各学生のデータには学番、氏名、3科目の成績が含まれており、キーボードからN人の学生のデータを入力し、3科目の総平均成績と、最高点の学生のデータ(学番、氏名、3科目の成績を含む)を印刷することを要求している.
487 ワード
やれやれ・・・
#include
using namespace std;
struct student
{
char id[5];
char name[10];
int score1;
int score2;
int score3;
};
int main()
{
student stu[10];
int n,s1=0,s2=0,s3=0,s=0,m;
cin>>n;
for(int i=0;i>stu[i].id>>stu[i].name>>stu[i].score1>>stu[i].score2>>stu[i].score3;
for(int i=0;i