es fibo code example
Example: es fibo
bool es_Fibo(int n){
bool fibo = false;
int a = 0, b = 1;
int c = a + b;
if(n == 0 || n == 1){
printf("es fibo\n");
fibo = true;
}else{
while(c < n){
c = a + b;
a = b;
b = c;
if(c == n){
printf("es fibo\n");
fibo = true;
}
if(c > n){
printf("no es fibo\n");
fibo = false;
}
}
}
return fibo;
}