#include <stdio.h>
char *input_1 = "11"; // al posto di argv[1];
unsigned int
fibonacci (unsigned int n)
{
if (n == 0)
{
return 0;
}
else if (n == 1)
{
return 1;
}
else
{
return (fibonacci (n-1) + fibonacci (n-2));
}
}
int
main (int argc, char *argv[])
{
unsigned int n;
unsigned int i;
for (i = 0; i <= n; i++)
{
printf ("%u ", fibonacci
(i
)); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgpjaGFyICppbnB1dF8xID0gIjExIjsgIC8vIGFsIHBvc3RvIGRpIGFyZ3ZbMV07Cgp1bnNpZ25lZCBpbnQKZmlib25hY2NpICh1bnNpZ25lZCBpbnQgbikKewogICAgaWYgKG4gPT0gMCkKICAgICAgewogICAgICAgIHJldHVybiAwOwogICAgICB9CiAgICBlbHNlIGlmIChuID09IDEpCiAgICAgIHsKICAgICAgICByZXR1cm4gMTsKICAgICAgfQogICAgZWxzZQogICAgICB7CiAgICAgICAgcmV0dXJuIChmaWJvbmFjY2kgKG4tMSkgKyBmaWJvbmFjY2kgKG4tMikpOwogICAgICB9Cn0KCmludAptYWluIChpbnQgYXJnYywgY2hhciAqYXJndltdKQp7CiAgICB1bnNpZ25lZCBpbnQgbjsKICAgIHVuc2lnbmVkIGludCBpOwoKICAgIHNzY2FuZiAoaW5wdXRfMSwgIiV1IiwgJm4pOwoKICAgIGZvciAoaSA9IDA7IGkgPD0gbjsgaSsrKQogICAgICB7CiAgICAgICAgcHJpbnRmICgiJXUgIiwgZmlib25hY2NpIChpKSk7CiAgICAgIH0KICAgIHByaW50ZiAoIlxuIik7CgogICAgcmV0dXJuIDA7Cn0=