【发布时间】:2013-11-11 02:15:40
【问题描述】:
我正在尝试创建一个 if 语句来验证用户的赌注是 100、300 还是 500。我做错了什么?
if ((roundBet != 100) || (roundBet != 300) || (roundBet != 500))
{
cout << "Incorrect input";
// Call round again
newRound();
}
【问题讨论】:
-
请注意,您可以从
if语句中删除四分之三的括号而不改变其含义。
标签: c++ logical-operators