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

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

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

#include "stdio.h" struct student { char num[6]; char name[8]; int score[3]; float avr; } stu[5]; main() {int i,j,sum; FILE *fp; /*input*/ 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 typedef struct {char name[20];char id[20];float math_score;float lang_score;}student;#define N 5int main(int argc, char** argv){int i;student stu[N];for (i = 0; i < N; ++i){printf ("输入第 %d 个学生的信息(顺...

#include #include #include #include #include #define MAX 200struct student{char no[10]; // 学号char name[50]; // 姓名float score[3]; // 分数float math;float eng;float phy;};struct data{int count; // 当前学生数组中学生的个数stru...

#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", &...

#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]...

float fChinese,fMath,fEnglish; float fSum,fAve; printf("请输入三科成绩:"); scanf("%f%f%f",&fChinese,&fMath,&fEnglish); fSum=fChinese+fMath+fEnglish; fAve=fSum/3; printf("Sum=%0.2f,Ave=%0.2f",fSum,fAve); return 0;

#include void main() { int buf[6][3] = {0}; int i, num , chinese, math, english, grade; for(i = 0; i < 6; i++) { printf("请输入%d号学生语数英成绩,以空格隔开,回车确认\n", i); scanf("%d %d %d", &chinese, &math, &english); buf[i...

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