1067

来源:互联网 发布:小号男士衣服淘宝店铺 编辑:程序博客网 时间:2024/06/10 23:51
#include<iostream> #include<stdio.h>#include<string.h>#include<algorithm>using namespace std;#define N 100int main(){    char pw[N],pw1[N];    int n,t=0;    scanf("%s %d",pw,&n);    //printf("%s %d\n",pw,n);    getchar();    while(gets(pw1)&&!(strlen(pw1)==1&&pw1[0]=='#'))    {        t++;        if(strcmp(pw,pw1)==0)        {            printf("Welcome in\n");            return 0;        }        else            printf("Wrong password: %s\n",pw1);        if(t==n)        {            printf("Account locked\n");            return 0;        }    }    return 0;}
0 0
原创粉丝点击