解题思路:
注意事项:
参考代码:
#include <stdio.h>
#include <string.h>
struct add{
char xh[10];
char xm[10];
int fs[3];
};
void input(int N,struct add a[]){
int i;
for(i=0;i<N;i++){
scanf("%s",a[i].xh);
scanf("%s",a[i].xm);
scanf("%d%d%d",&a[i].fs[0],&a[i].fs[1],&a[i].fs[2]);
}
}
void print(int N,struct add a[]){
int i;
for(i=0;i<N;i++){
printf("%s,",a[i].xh);
printf("%s,",a[i].xm);
printf("%d,%d,%d\n",a[i].fs[0],a[i].fs[1],a[i].fs[2]);
}
}
int main(){
struct add a[100];
int N;
scanf("%d",&N);
input(N,a);
print(N,a);
return 0;
}
0.0分
0 人评分
A+B for Input-Output Practice (VII) (C++代码)浏览:615 |
C语言程序设计教程(第三版)课后习题10.5 (C语言代码)浏览:551 |
C语言程序设计教程(第三版)课后习题6.9 (C语言代码)浏览:1006 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:483 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:613 |
WU-格式化数据输出 (C++代码)浏览:1212 |
WU-整数平均值 (C++代码)浏览:1244 |
【绝对值排序】 (C语言代码)浏览:821 |
1012题解浏览:869 |
The 3n + 1 problem (C语言代码)浏览:505 |