aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/31_while_if_test2.sy
blob: 34c92daa6affaa680d34e34b900d0281ccdd4768 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
int ifWhile() {
  int a;
  a = 0;
  int b;
  b = 3;
  if (a == 5) {
    while(b == 2){
      b = b + 2;
    }
    b = b + 25;
  }
  else 
    while (a < 5) {
      b = b * 2;
      a = a + 1;
    }
  return (b);
}


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