Algorithms_in_C
1.0.0
Set of algorithms implemented in C.
|
Compute \(m^{mth}\) Fibonacci number using the formulae: More...
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
Functions | |
void | fib (unsigned long n, unsigned long *C, unsigned long *D) |
int | main (int argc, char *argv[]) |
Compute \(m^{mth}\) Fibonacci number using the formulae:
\begin{eqnarray*} F_{2n-1} &=& F_n^2 + F_{n-1}^2 \\ F_{2n} &=& F_n\left(2F_{n-1} + F_n\right) \end{eqnarray*}
void fib | ( | unsigned long | n, |
unsigned long * | C, | ||
unsigned long * | D | ||
) |
Returns the \(n^{th}\) and \(n+1^{th}\) Fibonacci number. The return variables are C & D respectively.
int main | ( | int | argc, |
char * | argv[] | ||
) |
main function