搜索
首页 电脑/网络 互联网

选出成绩最好同学的成绩以及学号

全部回答

2008-11-09

0 0

    #include<stdio。h>main(){ int N,i,j; int num[80]; float score[80]; int best_stu; /*the best score number of student*/ float best; /*the best score of student*/ printf("%s","please input the total num of students:\n"); scanf("%d",&N); printf("please input these information:\n"); for(i=0;i<N;i++) { printf("num[%d]=",i); scanf("%d",&num[i]); printf("%s","score:"); scanf("%f",&score[i]); } printf("%s","the best students num is:\n"); best=score[0]; for(i=1;i<N;i++) { if(best<score[i]) { best=score[i]; best_stu=i; } } printf("%d ",num[best_stu]); printf("and her/his score is:\n"); printf("%。
    2f",best); getch();}结果我已经在wintc中测试过了,没问题,只是你要注意的是num变量我定义的是int型,别越位就ok。哎 当年学c的时候,我咋就没想到这世界上还有个“百度-知道类!!!”好了 有什么关于C的问题尽管问我,我是做嵌入式的,嵌入式的问题也行问我。
    。

2008-11-10

16 0

为什么不用excel,郁闷

2008-11-09

52 0

  这个程序要写很多行 给这些分不会有人帮你写的 或者是随便给你复制个学生管理系统的原程序给你贴过来 肯定不对路子 函数只能返回一个值 如果想返回多个值可以用指针 也可以用全局变量 全局数组就是全局变量-------------------------------------------------------会有人就为了帮你忙用30分钟写这么个程序再给你贴上来么?真有这种人百度上这么多问题又让人从何帮起呢?。
  

类似问题换一批

热点推荐

热度TOP

相关推荐
加载中...

热点搜索 换一换

电脑/网络
互联网
程序设计
电脑装机
操作系统/系统故障
硬件
笔记本电脑
百度
反病毒
软件
互联网
互联网
QQ
上网帮助
网站推荐
举报
举报原因(必选):
取消确定举报