diff options
| author | aarne <aarne@chalmers.se> | 2010-03-02 19:10:56 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2010-03-02 19:10:56 +0000 |
| commit | e4748e998453b979af46983a079f2ec3d307ada4 (patch) | |
| tree | ef1c2b278850a7f6a95959b6f18469645cf1094c /examples/gfcc/fibonacci.c | |
| parent | 21b10f91cbbd0a2d369dc55306bad53df1502cd7 (diff) | |
restored gfcc example (GF C compiler)
Diffstat (limited to 'examples/gfcc/fibonacci.c')
| -rw-r--r-- | examples/gfcc/fibonacci.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/gfcc/fibonacci.c b/examples/gfcc/fibonacci.c new file mode 100644 index 000000000..80e8a0d5c --- /dev/null +++ b/examples/gfcc/fibonacci.c @@ -0,0 +1,18 @@ +int mx () { + return 5000000 ; +} ; + +int main () { + int lo ; int hi ; + lo = 1 ; + hi = lo ; + printf("%d",lo) ; + { + while (hi < mx()) { + printf("%d",hi) ; + hi = lo + hi ; + lo = hi - lo ; + } + } + return ; +} ; |
