I have to print that number is in fibonacci sequence or not

I have land on result but it prints for all number you can check my program.

#include
using namespace std;

int main()
{
int a=0,b=1;
int n;
cin>>n;
int check_num;
cin>>check_num;
int c;
int i=2;
cout<<“0,1,”;
while(i<n)
{
if(c==check_num)
{
cout<<“true”;

	}
	else
	{
		cout<<"false";
		
	}
	

	
	cout<<c<<",";
	
	a=b;
	b=c;
	c=a+b;
	i=i+1;
}

@rssrivastavarohan hey rohan can you please share your code through ide.codingblocks.com.

Hi Neeraj,

Please solve my doubt

@rssrivastavarohan hey rohan please share your code with above link I will debug your code.

Hi Neeraj could you please send me the code to check whether number is present in fibonacci sequence or not

@rssrivastavarohan hey rohan so you want to check whether the number is present in the fibonaaci sequence or not ?

yes I want like it will take n input number and in next line it will take number which we have to search it will output as fibonacci sequence in one line upto n and print either true or false in next line . Just modify my code bro .

May I know Neeraj why you are responding here ; respond to the ask doubt section in the content.

@rssrivastavarohan hey rohan this is the code for to evaluate the number is under the fibonaaci series

Neeraj could you please call me on 9511434831 I will explain the problem to you

Mere bhai yaha kyu post krrahe kuch bhi bhai mera problem statement kuch or hai ye nahi hai

@rssrivastavarohan hey rohan yaar tum sanjeet me se contact karo me unko bolta hu tumse baat karlengi

Bhai mujhe please call krlo ye resolve hojayega there is nothing to include otherperson for this small thing

@rssrivastavarohan yaar tum ek baar baat kar lo phir saare doubt resolve ho jayegey technical related fhir me tumse call karke baat karleta hu

Bhai there is some miscommunication mai aapko batata hun mujhe kya input chahiye and kya output chahiye

Input --> Mujhe user se N input lena hai for which I have to print Fibonacci series upto N ; and second line me mujhe koi bhi random number lena hai to search taht number is present in output or not.

Output–> first line me fibonacci series upto N print ho annd next line me True or either false print ho agar number exist krta hai to true nahi to false.

Neeraj bhai nahi ho raha hai . Please help karo I dont know what is linear search Im bad t programming but I have tried using If else lekin vo output to sahi de raha lekin uska format galat hai.

Bro any response on this