#include <iostream>
using namespace std;
int main() {
bool b;
b = false;
cout << "b is " << b << endl;
b = true;
cout << "b is " << b << endl;
if(b) // control the if statement
cout << "This is executed.\n";
b = false;
if(b)
cout << "This is not executed.\n";
// outcome of a relational operator is a true/false value
cout << "10 > 9 is " << (10 > 9) << endl;
return 0;
}
|