using namespace std;
Int the Fibonacci (int int f1, f2, int k, int I)
{
Int f3;
F3=f1 + f2;
F1=f2;
F2=f3;
If (i<=k)
{
i++;
Fibonacci (f1, f2, k, I);
}
Return the f3.
}
Int main ()
{
Int k, f3;
Cout<" Input you want to calculate the series "& lt;
If (k==1 | | k==2)
F3=1;
The else
F3=Fibonacci (1, 1, k, 3);
Cout<" The resulting value is: ";
Cout
}
CodePudding user response:
The building Lord, you put the c + + code to VB version, is what mean?Now no c + + test environment, how you try this code:
int the Fibonacci (int int f1, f2, int k, int I)
{
Int f3;
F3=f1 + f2;
If (i{
+ + I;
F1=f2;
F2=f3;
Fibonacci (f1, f2, k, I);
}
Return the f3.
}
CodePudding user response:
Fibonacci (f1, f2, k, I); To the f3=Fibonacci (f1, f2, k, I);