一个简单的口令程序!
2008-03-08 12:25:34 来源:WEB开发网核心提示:#include<stdio.h>#include<conio.h>#include<dos.h>void main(void){ strUCt date today; struct time now; getdate(&today); gettime(&now); text
#include<stdio.h>
#include<conio.h>
#include<dos.h>
void main(void)
{ strUCt date today;
struct time now;
getdate(&today);
gettime(&now);
textcolor(WHITE);
textbackground(BLUE);
do { clrscr();
gotoxy(25,10);
PRintf("today's date is %d-%d-%d",today.da_mon,today.da_day,today.da_year);
gotoxy(28,12);
printf("the time is %2d:%2d:%2d",now.ti_hour,now.ti_min,now.ti_sec);
gotoxy(1,1);
} while(atoi((char*)getpass("passWord:"))!=today.da_mon+today.da_day+now.ti_hour);
textcolor(WHITE);
textbackground(BLACK);
clrscr();
gotoxy(1,1);
printf(" ");
}
更多精彩
赞助商链接