摘要:
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 ;}}} 阅读全文
摘要:
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); } } 阅读全文