Home > database >  An array: 1,1,2,3,5,8,13,21... What is m, 30 digits? Using a recursive implementation
An array: 1,1,2,3,5,8,13,21... What is m, 30 digits? Using a recursive implementation

Time:11-01

The static void Main (string [] args)
{
Console. WriteLine (Fun (6));
}
Public static int Fun (int m)//m represents an integer
{
If (m==1 | | m==2)
{
return 1;//the first second is a

}
The else
{
Return Fun Fun (m - 1) + (m - 2);
}
}

CodePudding user response:

Not right?

Console. WriteLine (Fun (30));

CodePudding user response:

This is a c # basic subject?
BBS is used to discuss unresolved issues, and the view here is essentially a,
Suggested that writes a personal blog, thank you