摘要:
素数 class Program { public static void GenPrimes(int[] arr) { bool flag = true; for (int i = 2; i < arr.Length; i++) { for (int j = i+1; j < arr.Length 阅读全文
摘要:
class Program { enum DigitType { ones=1,tens=10} static void DisplayArray(int[] n) { for (int i = 0; i <= n.GetUpperBound(0); i++) { Console.Write(n[i 阅读全文
摘要:
static void Main(string[] args) { int a = 20; int b = 30; int c; SwapMethod(ref a, ref b); Console.WriteLine(" After Swap a is {0},b is {1} ", a, b); 阅读全文
摘要:
class Program { static void Main(string[] args) { int[] arr=new int[10]; Random rnd = new Random(100); for (int i = 0; i <arr.Length; i++) { arr.SetVa 阅读全文