13-2.c

来自「水电出版社的《C语言程序设计实训》源代码」· C语言 代码 · 共 24 行

C
24
字号
/*13-2.c*/
#include<stdio.h>
#include<stdio.h>
main()
{
char *password="tcass";/* 密码 */
char *p;
int time=0;
do
{
   printf("Enter password:");
  gets(p);
  if(strcmp(p,password)==0)
	{ printf("OK!welcome\n");
	exit(0);
	}
else
  time++;
printf("\n");
}while(time<3);
if(time==3)
printf("You are irregal user\n");
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?