⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 86.c

📁 C语言实战105例 随书光盘 王为青 张圣亮编著 中国邮电出版社出版
💻 C
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -