fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. std::cout << (bool)-2 << std::endl;
  6. std::cout << (bool)-1 << std::endl;
  7. std::cout << (bool)0 << std::endl;
  8. std::cout << (bool)1 << std::endl;
  9. std::cout << (bool)2 << std::endl;
  10. }
Success #stdin #stdout 0.02s 2724KB
stdin
Standard input is empty
stdout
1
1
0
1
1