a b c d e   
if (b>a) a=b;  //a
if(d>c) c=d;//c
if(c>a) a=c; //a
if(e>a) a=e;a最大

解决方案 »

  1.   

    if(a>b)
    {
     Console.WriteLine("a is bigger then b");
    }
    if(b>c)
    {
       Console.WriteLine("b is bigger then c");
    }
      

  2.   

    冒泡排序
    http://topic.csdn.net/u/20090406/11/16f2af3e-32db-4d26-8345-e1ecf524553e.html
    List<int> lst=new List<int>();lst.Sort();
      

  3.   

    我的沾边呀.LZ是要比较大小,不是排序.也不是选择最大或者最小.所以,我给的if判断而已.没有其他的.
      

  4.   

    a b c d e   
    Console.Write(b>a?"":"");
      

  5.   

    呵呵,编程 也符合2 8定律,80%时间用于思考,20%用于code
      

  6.   

    测试过,代码可以正常排序,没有用for while等循环,但是用了递归,不知道算不算违例!namespace ConsoleApplication1
    {
       public class Program
        {
         static void ChanageData(ref int[] a,  int index ,  int end)
         {
                try
                {
                    int tmp;
                    if (index >end)
                    {
                        return;
                    }
                    if (a[index] < a[index + 1])
                    {
                        tmp = a[index];
                        a[index] = a[index + 1];
                        a[index + 1] = tmp;
                        index++;
                        ChanageData(ref a, index, end);
                    }
                    else
                    {
                        index++;
                        ChanageData(ref a, index, end);
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
           }        static void Main(string[] args)
            {
                int index=0,end=4;
                int[] a = new int[5];
                for(int i=0;i<5;i++)
                {
                    Console.WriteLine("请输入第"+Convert.ToString(i+1)+"个数字:");                a[i] =Convert.ToInt32( Console.ReadLine());
                }            ChanageData(ref a, 0, 4);
                ChanageData(ref a, 0, 3);
                ChanageData(ref a, 0, 2);
                ChanageData(ref a, 0, 1);            Console.WriteLine("***************************************************************");
                 for(int i=0;i<5;i++)
                 {
                    
                     Console.WriteLine(a[i].ToString());
                 }
                 Console.ReadLine();
                
            }                  }
    }