gpt4 book ai didi

c++ - 程序不会运行 while 语句消息

转载 作者:行者123 更新时间:2023-11-28 02:27:37 24 4
gpt4 key购买 nike

<分区>

我正在制作一款游戏,我希望它仅在玩家通过说 PLAY 表示同意时运行,但它不会运行。这是我的代码:

#include <iostream>
#include <stdlib.h>
using namespace std;

int main()
{
int balance = 500;
char start;

cout << "Welcome to Vegas! Your starting balance is 500 dollars lets play! " << endl;
cout << "Type PLAY to begin !" <<endl;
cin >> start;
while(start == 'PLAY') {

cout << "Your beginning numbers are!" << endl;

}
}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com