diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-03-21 17:03:38 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-03-21 17:03:38 +0000 |
commit | 190b7a0e5d45367230795ac0bdf6fc2f248ba9e1 (patch) | |
tree | dc9a605ced1784faf80d71f7f59e49b79d6bb2c7 /c_compiler/test/in/fib.c | |
parent | af8b76d0a83813b3cebac7468db4bd64e534c235 (diff) | |
download | Compiler-190b7a0e5d45367230795ac0bdf6fc2f248ba9e1.tar.gz Compiler-190b7a0e5d45367230795ac0bdf6fc2f248ba9e1.zip |
changed type layout to have all necessary information
Diffstat (limited to 'c_compiler/test/in/fib.c')
-rw-r--r-- | c_compiler/test/in/fib.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/c_compiler/test/in/fib.c b/c_compiler/test/in/fib.c new file mode 100644 index 0000000..17a3b41 --- /dev/null +++ b/c_compiler/test/in/fib.c @@ -0,0 +1,20 @@ +int main() +{ + int n, first = 0, second = 1, next, c; + + n = 10; + + for ( c = 0 ; c < n ; c++ ) + { + if ( c <= 1 ) + next = c; + else + { + next = first + second; + first = second; + second = next; + } + } + + return next; +} |