Getting a warning : Implicit declaration of function 'Fibonacci' is invalid in C99.
What's wrong?
#include <stdio.h>
int main(int argc, const char * argv[])
{
int input;
printf("Please give me a number : ");
scanf("%d", &input);
getchar();
printf("The fibonacci number of %d is : %d", input, Fibonacci(input)); //!!!
}/* main */
int Fibonacci(int number)
{
if(number<=1){
return number;
}else{
int F = 0;
int VV = 0;
int V = 1;
for (int I=2; I<=getal; I++) {
F = VV+V;
VV = V;
V = F;
}
return F;
}
}/*Fibonacci*/
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…