Advertisement
TwITe

Untitled

Aug 2nd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. bool && (bool cond1, bool cond2) {
  2.     if (!cond1) {
  3.         return false;
  4.     }
  5.     else {
  6.         return true;
  7.     }
  8. }
  9.  
  10. int & (int cond1, cond2) {
  11.     return cond1 & cond2;
  12. }  
  13.  
  14. bool & (bool cond1, bool cond2) {
  15.     if (!cond1) {
  16.         if (!cond2) {
  17.             return false;
  18.         }
  19.         else {
  20.             return false;
  21.         }
  22.     }
  23.     if (cond1) {
  24.         if (!cond2) {
  25.             return false;
  26.         }
  27.         else {
  28.             return true;
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement