void fibo(unsigned int x, unsigned int *fib) { unsigned int f0, f1, f, k; f0 = 0; f1 = 1; if (x <= 0) { f = f0; } else if (x == 1) { f = f1; } else { for (k = 2; k <= x; k = k + 1) { f = f1 + f0; f0 = f1; f1 = f; } } *fib = f; }