fork download
  1. #include<iostream>
  2. using namespace std;
  3. int main(){
  4. string zh,mm;
  5. cout<<"请输入账号:"<<endl;
  6. cin>>zh;
  7. cout<<"请输入密码"<<endl;
  8. cin>>mm;
  9. if(zh=="abc"&&mm=="123"){
  10. cout<<"登录成功"<< endl;
  11. }
  12. else{cout<<"登录失败";}
  13. }
  14. //&&代表逻辑语左边右边条件同时完成执行当下代码登录成功
  15. //否则执行下一条代码登录失败
Success #stdin #stdout 0s 5320KB
stdin
1
2
10
42
11
stdout
请输入账号:
请输入密码
登录失败