解题思路:
注意事项:
参考代码:
#include<iostream> using namespace std; #include<string> int main() { int i,j=2; string s1,s2; cin>>s1>>s2; while(j>=0) { if(s1.compare("dotcpp")==0&&s2.compare("123456")==0) { cout<<"Successful landing!"; break; } else { if(j!=0) cout<<"Landing failure! There's another "<<j<<" chance!"<<endl; cin>>s1>>s2; j--; if(j==0) cout<<"Account freeze!"; } } return 0; }
0.0分
1 人评分
不会做的浏览:947 |
C语言训练-数字母 (C语言代码)浏览:666 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:1327 |
C语言程序设计教程(第三版)课后习题8.5 (C语言代码)浏览:595 |
1017题解浏览:661 |
A+B for Input-Output Practice (VII) (C语言代码)浏览:564 |
C二级辅导-同因查找 (C语言代码)浏览:609 |
C语言程序设计教程(第三版)课后习题10.7 (用指针求解)浏览:1531 |
小O的数字 (C语言代码)浏览:1479 |
C语言训练-百钱百鸡问题 (C语言代码)浏览:534 |