目录
题面
1518. C语言程序设计教程(第三版)课后习题11.3
描述
现有有N个学生的数据记录,每个记录包括学号、姓名、三科成绩。 编写一个函数input,用来输入一个学生的数据记录。 编写一个函数print,打印一个学生的数据记录。 在主函数调用这两个函数,读取N条记录输入,再按要求输出。 N<100
输入
学生数量N占一行 每个学生的学号、姓名、三科成绩占一行,空格分开。
输出
每个学生的学号、姓名、三科成绩占一行,逗号分开。
输入样例 1 点击复制
3 1 2 3 4 5 5 6 7 8 9 10 11 12 13 14
输出样例 1
1,2,3,4,5 5,6,7,8,9 10,11,12,13,14
思路
重点
代码
#include<ctype.h>
#include<limits.h>
#include<math.h>
#include<stdbool.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define ss struct student
struct student{
char s[100];
char name[100];
int a;
int b;
int c;
}list[100];
void solve(){
int n;scanf("%d",&n);
for(int i = 0; i < n; i++){
scanf("%s