Hi friends
I am having trouble putting the "not a fabonacci number" msg in my code
, plz help
/*
Name: fabonacci series and searching of element
Copyright: devesh
Author:
Date: 14/12/10 01:29
Description:
*/
14/12/10 01:29
#include<iostream.h>
#include<conio.h>
int main()
{
int fab,x1=0,x2=1,no,a[18];
for(int i=0;i<18;i++)
{
fab=x2+x1;
x1=x2;
x2=fab;
a[i]=fab;
cout<<fab<<" ";
}
cout<<"\n\n enter the no to test :";
cin>>no;
for(int j=0;j<18;j++)
{
if(a[j]==no )
{
cout<<"\n\n Fabonacci";
break;
}
}
getch();
}