mshd.net
当前位置:首页 >> C语言编程:输入5个学生3门课的成绩语文,数学,英... >>

C语言编程:输入5个学生3门课的成绩语文,数学,英...

#include #include #define NAME_MAX 10#define NUMBER_MAX 10#define STUDENTS_MAX 5#define CLEAR_ENTER(array) for(int idx=0;array[idx]!='\0';idx++)\if(array[idx]=='\n')\array[idx]='\0';typedef unsigned int Uint32;typedef struct st...

#include double a[11][5]={0};int i,j;void scanfa(double b[11][5]){printf("请依次输入每位同学的语文、数学、英语的成绩:\n");for(i=0;i

#include double a[11][5]={0}; int i,j; void scanfa(double b[11][5]) { printf("请依次输入每位同学的语文、数学、英语的成绩:\n"); for(i=0;i

#include struct Student{ int num; char name[20]; float score[3], average;};int main(void){ int i, j; struct Student std[10] = {0}, temp; puts("Please enter information of student : "); for (i = 0; i < 10; ++i) { scanf("%d%s", &...

#includeint main(){int a,b,c; scanf("%d%d%d",&a,&b,&c); printf("三科总分=%d\n",a+b+c); return 0;}

定义一个结构体然后求和,然后排序

#include#includeint main(){ int n[5],i,isave,num; char *c[]={"数学","语文","英语","物理","化学"}; printf("输入%s,%s,%s,%s,%s 5门的成绩:\n",c[0],c[1],c[2],c[3],c[4]); scanf("%d%d%d%d%d",&n[0],&n[1],&n[2],&n[3],&n[4]); num=n[0]...

#include #include #define MAXLENGTH 100typedef struct student{int number;char name[MAXLENGTH];double chinese, math, english;struct student *next;}student;int main(){student *head, *tail, *node, *loc, *prev;FILE *fout, *fin;int ...

#include double a[11][5]={0};int i,j;void scanfa(double b[11][5]){ printf("请依次输入每位同学的语文、数学、英语的成绩:\n"); for(i=0;i

#include double a[11][5]={0}; int i,j; void scanfa(double b[11][5]) { printf("请依次输入每位同学的语文、数学、英语的成绩:\n"); for(i=0;i

网站首页 | 网站地图
All rights reserved Powered by www.mshd.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com