qfedu-cpp-level/day1/d10.cpp

14 lines
225 B
C++
Raw Permalink Normal View History

// bool 类型
#include <iostream>
using namespace std;
int main()
{
bool flag = 2; // 非 0 即 true0 为 false
if (flag)
cout << "true" << endl;
else
cout << "false" << endl;
return 0;
}