example-1.c 246 Bytes
Newer Older
Tim Gymnich's avatar
Tim Gymnich committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
volatile int x1,x2,x3;
volatile int condition;


void P() {
    if (condition) {
        x1 = x1 + x2 + 1;
        x3 = x3 + 1;
        P();
        x1 = x1 - x2;   
    }
}


int main() {
    x2 = x1;
    x3 = 0;
    P();
    x1 = 1 - x2 - x3;
}