【问题标题】:Thsi is about if loop这是关于 if 循环
【发布时间】:2022-06-17 03:25:18
【问题描述】:
1.#include <iostream>
2.
3.
4.int main()
5.{
6.    int number;
7.    std::cout << "please enterv your number: ";
8.    std::cin >> number;
9.    if (number >= 0 && number <= 10)
10.    {
11.        std::cout << "TRUE";
12.    }
13.    else
14.    {
15.        std::cout << "FALSE";
16.    }
17.
18.    return 0;
19. }

这是我的 C++ 代码。例如,如果给出 3,作为输出,我希望得到 true,但它显示的不是 true,而是 1。我应该怎么做才能得到 true?

enter image description here

【问题讨论】:

  • 请不要在代码中添加行号...

标签: c++


猜你喜欢
  • 2017-09-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-12-03
相关资源
最近更新 更多