#include
int* fib(int);
int main()
{
int count;
std::cout<<\"enter number up to which fibonacci series is to be printed\"<
Here is an example of fibonacci series, and I started mine off with a[0] = 1 and a[1] = 1. Fibonacci series normaly start with 0 and 1 but mine will start 1 and 1.
#include "stdafx.h"
#include
using namespace std;
int main()
{
int a[25];
int i,j;
int fib[25];
int fibs;
char z;
a[0] = 1;
a[1] = 1;
fib[1] = a[0];
fib[2] = a[1];
fibs = 0;
for ( i=2; i<25; i++ )
{
fibs = fib[1] + fib[2];
fib[1] = fib[2];
fib[2] = fibs;
a[i] = fibs;
}
for(i=0; i<25; i++)
{
cout << "a[" << i << "]=" << a[i] << endl;
}