首页 > 学院 > 开发设计 > 正文

1067. 试密码(20)

2019-11-06 06:58:52
字体:
来源:转载
供稿:网友

1067. 试密码(20)

#include <iostream>#include <cstdio>#include <string>#include <algorithm>using namespace std;int main(){ int n; string pass,str; cin>>pass>>n; cin.get(); while(n--) { getline(cin,str); if(str=="#") return 0; else if(str==pass) { cout<<"Welcome in"<<endl;return 0; } else { cout<<"Wrong passWord: "<<str<<endl; } } cout<<"Account locked"<<endl; return 0;}
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表