+ 1
When do we use bool variable ?
7 Respostas
+ 8
When a true/false value is required to be stored/tracked
http://www.learncpp.com/cpp-tutorial/26-boolean-values/
+ 5
Any time you have a yes or no question/answer.
+ 5
I used one here to verify my number.
https://code.sololearn.com/cF7iOkU73BYy/?ref=app
+ 2
Think of it as a fork in the road of your code. If true, do one thing, if false do something else. Boolean variables should be named appropriately too - by convention you should prefix your variable names with "Is". For example, if determining that the side of a coin is heads I might create the variable name "IsHeads" .
+ 1
In any flow control statements (if/else, switch, loops...)
+ 1
yes
0
for true or false