#include <iostream>
using namespace std;
int main()
{
int a=1;
int b=0;
int c=0;
while(c<=100)
{
cout << c << "\n";
b=a;
a=c;
c=a+b;
}
system("pause");
return 0;
}
this is what i got to show the fib series up to 100 but i was actually interested in learning a way to introduce a number and for the program to tell me if the number is in the series. Anyone can tell me the changes i can make to do that?