86.c
来自「《C语言实战105例》,一些常用的c语言源代码」· C语言 代码 · 共 31 行
C
31 行
#include <stdio.h>
#include <conio.h>
#include <dos.h>
int PassInput()
{
struct date today;
getdate(&today); /*把系统当前日期存入today所指向的date结构中*/
/*当输入口令不对时,反复进行以下循环*/
do{
clrscr(); /*调用清屏函数*/
puts("-------------------------------------------");
puts("* Welcome to use this program! *");
puts("-------------------------------------------");
printf(" Please input the password:\n");
}
while (atoi((char *) getpass("password:")) != today.da_mon * 100 + today.da_day);
return 1;
}
void main(void)
{
int i;
i=PassInput();
if(i==1)
{
/*如果输入正确,则显示正确信息*/
printf(" Password Correct!\n");
printf(" You can use the program....\n");
}
getchar();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?