Advertisement
Guest User

A Program Using Boolean Variables (Coded in C++)

a guest
Jan 29th, 2015
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. /*
  5. A Program Using Boolean Variables
  6. */
  7.  
  8. int main()
  9. {
  10. //Creates Boolean Variable
  11. bool BoolValue;
  12.  
  13.  
  14. //Sets Boolean Variable to true then displays output "1" for true
  15. BoolValue = true;
  16. cout << BoolValue << endl;
  17.  
  18. //Sets Boolean Variable to false then displays output "0" for false
  19. BoolValue = false;
  20. cout << BoolValue << endl;
  21.  
  22. //Returns 0 to machine (end of code)
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement