标签:line console foo else lse turn OLE code 计算
1 public class MainClass 2 { 3 public static void Main() 4 { 5 Console.WriteLine(Foo(30)); 6 } 7 8 public static int Foo(int i) 9 { 10 if (i <= 0) 11 return 0; 12 else if(i > 0 && i <= 2) 13 return 1; 14 else return Foo(i -1) + Foo(i - 2); 15 } 16 }
标签:line console foo else lse turn OLE code 计算
原文地址:https://www.cnblogs.com/MirZhai/p/11896702.html