Rwing
0
Q:

boolean meaning

while (tries < 4) {
    cout << "Do you want to proceed (y or n)?\n";
    char answer = 0;
    cin >>answer;
    switch (answer) {
    case 'y':
    return true;
    case 'n':
    return false;
    default:
    cout << "Sorry, I don't undersand that.\n";
        ++tries;
        }
        
0
In computer science, the Boolean data type is a data type that has one of two possible values which is intended to represent the two truth values of logic and Boolean algebra. It is named after George Boole, who first defined an algebraic system of logic in the mid 19th century.
0
bool x = true;
if (x) { print ("Hello") }
0

New to Communities?

Join the community