#include<stdio.h>
main()
{
static int n=0, number=1;
int fibi (int n, int number);
printf ("Following are the first 40 Numbers of the Fibonacci Series:\n");
printf ("1 ");
fib (n,number);
}
fib (int n, int number)
{
static int i=1;
int fibo;
if (i==40)
{
printf ("\ndone");
}
else
{
fibo=n+number;
n=number;
number=fibo;
printf ("\n%d", fibo);
i++;
fib (n,number);
}
}
my program shows the following.
1
2
3
5
8
13
21
34
55
89
144
233
377
610
987
1597
2584
4181
6765
10946
17711
28657
46368
75025
i want my program to show
1
2 prime
3 prime
5 prime
8
13 prime
21
34
55
89 prime
144
233 prime
377
610
987
1597 prime
2584
4181
6765
10946
17711
28657 prime
please help me!!!!!!