C++ Boolean Expressions
A Boolean expression is a C++ expression that returns a
boolean value:1 (true) or 0 (false).
You
can use a comparison operator, such as the greater than (>) operator to find out if an expression (or a
variable) is true:
Program:
#include <iostream>
using namespace std;
int main() {
int x = 10;
int y = 9;
cout << (x > y);
return 0;
}
Output:
1
No comments:
Post a Comment