qfedu-cpp-level/day1/d10.cpp

14 lines
225 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 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;
}