fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. bool conjunction(bool, bool);
  5. bool disjunction(bool, bool);
  6.  
  7. int main()
  8. {
  9. std::cout << std::boolalpha;
  10. bool p, q, A, B, C, D;
  11. for (int a = 0; a < 1; a++) {
  12. A = a;
  13. for (int b = 0; b < 1; b++) {
  14. B = b;
  15. for (int c = 0; c < 1; c++) {
  16. C = c;
  17. for (int d = 0; d < 1; d++) {
  18. D = d;
  19. cout << A << "|" << B << "|" << C << "|" << D << endl;
  20. cout << conjunction(!A, B) << endl;
  21. }
  22. }
  23. }
  24. }
  25. }
  26. bool conjunction(bool p, bool q)
  27. {
  28. return p && q;
  29. }
  30. bool disjunction(bool p, bool q)
  31. {
  32. return p || q;
  33. }
Success #stdin #stdout 0s 5552KB
stdin
Standard input is empty
stdout
false|false|false|false
false