Write a c programme to check whether given number is Fibonacci?

1 answer

Answer

1213748

2026-06-13 12:10

+ Follow

#include<iOStream.h>

#include<conio.h>

void main()

{

long int n,a=0,b=1;

cout<<"dear user Enter number as u wish";

cin>>n;

while(n>0)

{

c=a+b;

cout<<"c<<"\t\t";

a=b;

b=c;

}

getch();

}

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.