aboutsummaryrefslogtreecommitdiff
path: root/rcc-legacy/tests/sysy_lvX/032_if_test5.sy
blob: 39cf8909151a00d83000d81ca1e65e2dafe1276d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// test if-{if}-else
int if_if_Else() {
  int a;
  a = 5;
  int b;
  b = 10;
  if(a == 5){
    if (b == 10) 
      a = 25;
  }
    else 
      a = a + 15;
  return (a);
}

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