李怀政


私信TA

用户名:lhz2937739768

访问量:12790

签 名:

撸起袖子加油干

等  级
排  名 195
经  验 6470
参赛次数 2
文章发表 120
年  龄 19
在职情况 学生
学  校 长江大学
专  业 电气工程及其自动化

  自我简介:

TA的其他文章

解题思路:

注意事项:

参考代码:

#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 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区