回复 49楼 zcfyxw
貌似挺麻烦啊

认认真真的学习,踏踏实实的走路:戒骄戒躁!!!
2012-12-31 16:53

2012-12-31 16:58
程序代码: #include<stdio.h>
#include<string.h>
#include<time.h>
main()
{
char a[5][5],b[5][5];
int i,j,m,n=0;
long t1,t2;
t1=time(NULL);
for(j=0,i=1;j<5;j++,i+=2,gotoxy(1,i))
{
for(m=0;m<5;m++) {
a[j][m]=97+rand()%26;
printf("%c",a[j][m]);}
}
gotoxy(1,2);
for(j=0,i=1;j<5;j++,i+=2,gotoxy(1,i+1))
for(m=0;m<5;m++){
if((b[j][m]=getch())=='\n'){fflush(stdin);break;}
if(b[j][m]==a[j][m])
cprintf("%c",b[j][m]);
else{
textcolor(4);
cprintf("%c",b[j][m]);
textcolor(7);
} }
t2=time(NULL);
printf("mei fen zhong da zi %d ge .",(m*j)/((int)(t2-t1)));
getch();
}又改了下

2012-12-31 17:05
2012-12-31 17:06
2012-12-31 17:08
2012-12-31 17:09
2012-12-31 17:10
2012-12-31 17:11

2012-12-31 17:13
2012-12-31 17:15