问题标题: 酷町堂:酷丁平台上写了一段代码,编译成功,可运行是空白

0
0
孙天意
孙天意
资深守护
资深守护

#include "codingtang.h"

using namespace std;

int main(){

    createConsole("文本游戏");
    
    long long a,b;
    bool flag=true;
    char x;
    cout<<"玩不玩速算游戏?\na.玩 b.不玩";
    cin>>x;
    if(x=='b'){
        return 0;
    }else{
        cout<<"2^2=?\na.4 b.6";
        cin>>x;
        if(x==a){
            cout<<"答对了";
            return 0;
        }else{
            cout<<"Q~Q";
            return 0;
        }
    }
    return 0;
}


0
潘思呈
潘思呈
中级光能
中级光能

别这样写

搜一下游戏"1"

看他怎么写

我要回答