急急急。。谁能给我一个用C语言(TC2.0)编写的简单动画程序要有详细解释, 原创

最好有运行的结果。截图。发到我邮箱里 啊[email protected]好的再加分

第1个回答  2010-12-10
#include "time.h"
#include "conio.h"
#include "stdio.h"
#include "string.h"

/*---按键游戏---*/

Game()
{
time_t Ttime ;
double Score = 0 ;
int Times = 0 ;
int j , i , Longer , x = 8 , y ;
char *Letter = "Q W E R T Y U I O P [ ] A S D F G H J K L ' Z X C V B N M , . /" ; /*全部按钮*/
char get ;
textcolor(12) ;
gotoxy(8 , 2) ;
cprintf("%s" , Letter) ;
gotoxy(27 , 12) ;
printf("Score = %d , Times = %d" , Score , Times) ;
for (j = 4 ; j < 77 ; j++)
{
gotoxy(j , 25) ;
printf("-") ; /*屏幕25楼画线条*/
}

Longer = strlen(Letter) ;

while (*Letter != '\0')
{
for (y = 2 , i = 0 ; y < 25 ; y++)
{
delay(40000) ;
gotoxy(x , y - 1) ;
printf(" ") ;
gotoxy(x , y) ;
printf("%c" , *(Letter + i)) ; /*从屏幕2楼往24楼下掉字母*/
if (kbhit())
{
get = getch() ;
if (get == *(Letter + i) || (get - 32) == *(Letter + i))
{
Score++ ; Times++ ;
gotoxy(27 , 12) ;
printf("Score = %.2lf , Times = %d" , Score / 26 , Times) ;
gotoxy(x , 24) ;
printf("%c" , 1) ;
break ;
}
}
}
Letter += 2 ;
x += 2 ;
}
}

main()
{
Game() ;
}本回答被网友采纳
第2个回答  2010-12-12
给你发啦。。本回答被提问者采纳
第3个回答  2010-12-10
不会,TC2.0跟VC没有太大差别,看看这个
http://zhidao.baidu.com/question/106444462.html
相似回答