打字游戏代码

#include<stdlib.h>#include<graphics.h>#include<conio.h>#include<dos.h>#include<time.h>#define BK_COLOR BLACK /*定义背景颜色*/#define C_COLOR BLUE /*定义画笔颜色*/#define UpKey 72 #define DownKey 80#define Esc 27#define Enter 13#define MenuX 200 /*定义目录的横坐标*/#define MenuY 110#define MenuWidth 200...
2010-04-17 12:32 | 阅读 1157 次 | 评论 4 条

二级考试上机题--编程题

1: 第1题 m个人的成绩存放在score数组中,请编写函数fun,它的功能是:将低于平均分的人作为函数值返回,将低于平均分的分数放在below所指定的函数中。 答案: int fun(int score[],int m,int below[]){int i,k=0,aver=0;for(i=0;i<m;i++)aver+=score[i];aver/=m;for(i=0;i<m;i++)if(score[i]<aver){below[k]=score[i];k++;}return k;} 2: 第2题 请编写函数fun,它的功能是:求出1到100之内能北7或者11整除,但不能同时北...
2010-03-24 17:36 | 阅读 875 次 | 评论 0 条