赞
踩
using System; namespace Prosose { public class Fibonacci { static void Main(string[] args) { int[] array = new int[] {3, 5, 1, 8, 6, 4, 33, 13, 26, 13}; int temp; for(int a = 0; a < array.Length - 1; a ++) { for(int i = 0; i < array.Length -1; i ++) { if (array[i] > array[i + 1]) { temp = array[i]; array[i] = array[i + 1]; array[i + 1] = temp; } } } foreach (int Recursive in array) { Console.Write(Recursive + ","); } } } }
using System; namespace Prosose { public class Fibonacci { static void Main(string[] args) { int a = 7; int again = 0; while (true) { if (a % 2 == 0) { a /= 2; if (a < 2) { Console.WriteLine("\n" + "一共运行了" + again + "次"); break; } } else { a *= 3; a += 1; } again ++; Console.Write(a + ", "); } } } }
using System; namespace Prosose { public class Fibonacci { static void Main(string[] args) { int k = 0; for(int a = 0; a < 10; a ++) { k ++; for(int b = 1; b < k; b ++) { Console.Write(b + "*" + a + "=" + a*b + " "); } Console.WriteLine(""); } } } }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。