摘要:
int [] array = new int [*] ;int temp = 0 ;for (int i = 0 ; i < array.Length - 1 ; i++){for (int j = i + 1 ; j < array.Length ; j++){if (array[j] < array[i]){temp = array[i] ;array[i] = array[j] ;array[j] = temp ;}}} 阅读全文
posted @ 2011-02-22 21:35
xfyn
阅读(134)
评论(0)
推荐(0)
摘要:
public class MainClass { public static void Main() { Console.WriteLine(Foo(30)); } public static int Foo(int i) { if (i <= 0) return 0; else if(i > 0 && i <= 2) return 1; else return Foo(i -1) + Foo(i - 2); } } 阅读全文
posted @ 2011-02-22 21:09
xfyn
阅读(218)
评论(0)
推荐(0)