aboutsummaryrefslogtreecommitdiff
path: root/rcc-legacy/tests/functional/23_if_test2.sy
blob: b047227bedf4cd70cf6449f2e35b1b25b95984a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// test if-else else-if
int ifElseElseIf() {
  int a;
  a = 66;
  int b;
  b = 8923;
  if (a == 5) {
    b = 25;
  }
  else if (a == 10) {
    b = 42;  
  }
  else {
    b = a * 2;
  }
  return (b);
}

int main() {
  return (ifElseElseIf());
}