diff options
Diffstat (limited to 'fibbonacci.c')
-rw-r--r-- | fibbonacci.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fibbonacci.c b/fibbonacci.c new file mode 100644 index 0000000..4ebad5c --- /dev/null +++ b/fibbonacci.c @@ -0,0 +1,13 @@ +#include <stdio.h> + +int main(/*int argc, char **argv*/) { + int a = 0, b = 1, c = 0; + + do { + printf("%d, ", a); + a = b + c; + c = b; + b = a; + } while (a < 100); + return 0; +} |