chenyu


私信TA

用户名:17738377482

访问量:38607

签 名:

像风明天就会来一样期待,像风永远不会来一样生活

等  级
排  名 66
经  验 10093
参赛次数 18
文章发表 99
年  龄 0
在职情况 学生
学  校 HCU
专  业

  自我简介:

解题思路:

    看题

注意事项:

参考代码:

#include<bits/stdc++.h>
using namespace std;

struct studen
{
 char xuehao[10];
 char name[10];
 int score1;
 int score2;
 int score3;
}student[100];

int main()
{
 int n;
 cin>>n;
 for(int i = 0;i < n;i++)
 {
  cin>>student[i].xuehao;
  cin>>student[i].name;
  cin>>student[i].score1;
  cin>>student[i].score2;
  cin>>student[i].score3;
 }
 for(int i = 0;i < n;i++)
 {
  printf("%s,",student[i].xuehao);
  printf("%s,",student[i].name);
  printf("%d,",student[i].score1);
  printf("%d,",student[i].score2);
  printf("%d\n",student[i].score3);

 }
    return 0;
}


 

0.0分

0 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区