summaryrefslogtreecommitdiff
path: root/tests/logical.c
blob: 6bd10180ff727430652d1f83cfc3d462ace176c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
int main() {
  int a = 1;
  int b = 0;
  int c = 1;
  
  int and1 = a && b;
  int and2 = a && c;
  int or1 = a || b;
  int or2 = b || b;
  int not1 = !a;
  int not2 = !b;
  
  return and1 + and2 + or1 + or2 + not1 + not2;
}