<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    相信自己!

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      26 隨筆 :: 3 文章 :: 13 評論 :: 0 Trackbacks
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    namespace ConsoleApplication2
    {
        
    class Program
        
    {
            
    //int num = 0;
            static void Main(string[] args)
            
    {
                Stack
    <string> aa = new Stack<string>();
                aa.Push(
    "111");
                aa.Push(
    "222");
                aa.Push(
    "333");
                
    //int num = aa.Count;
                for (int i = 0; i < aa.Count; i++)
                
    {
                    string bb 
    = aa.Pop();
                    Console.WriteLine(bb);
                }

                Console.Read();

            }

            
        }

    }






    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    namespace ConsoleApplication2
    {
        
    class Program
        
    {
            
    //int num = 0;
            static void Main(string[] args)
            
    {
                
    int[] ss = new int[] 12,3,67,22,89,102,2,54};
                Console.WriteLine(
    "原始數據如下:");
                
    for (int k = 0; k < ss.Length; k++)
                
    {
                    Console.Write(ss[k] 
    + "    ");
                }

                Console.WriteLine(
    "  ");
                sort(ss, 
    07,0);
                
                Console.Read();
            }

            
    public static void sort(int[] array, int left, int right,int num)
            
    {
                
                
    int i, j;
                
    int middle, t;
                i 
    = left;
                j 
    = right;
                middle 
    = array[(left + right) / 2];
                
    do
                
    {
                    
    //從左側找大于中間值的數
                    while ((array[i] < middle) && (i < right))
                    
    {
                        i
    ++;
                    }

                    
    //從右側找小于中間值的數
                    while ((array[j] > middle) && (j > left))
                    
    {
                        j
    --;
                    }

                    
    //找到了一對就交換
                    if (i <= j)
                    
    {
                        t 
    = array[i];
                        array[i] 
    = array[j];
                        array[j] 
    = t;
                        i
    ++;
                        j
    --;
                        num 
    = num + 1;
                        Console.WriteLine(
    "第{0}次排序的結果", num);
                        
    for (int k = 0; k < array.Length; k++)
                        
    {
                            Console.Write(array[k] 
    + "    ");
                        }

                        Console.WriteLine(
    "  ");
                    }

                }
     while (i <= j); 
                
    if (left < j)
                
    {
                    sort(array, left, j,num);
                }

                
    if (right> i)
                
    {
                    sort(array, i, right,num);
                }

            }

        }

    }
    posted on 2008-04-29 16:18 北極雪 閱讀(253) 評論(0)  編輯  收藏 所屬分類: c#

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 丝袜熟女国偷自产中文字幕亚洲| 亚洲中文无码永久免费| 四虎免费久久影院| 日韩欧美亚洲中文乱码| 大地资源在线观看免费高清| 亚洲丝袜中文字幕| 毛片在线免费视频| 亚洲av无码专区亚洲av不卡| 国产性生交xxxxx免费| 无人视频免费观看免费视频 | 全免费a级毛片免费看不卡| 亚洲无mate20pro麻豆| 成人免费看片又大又黄| 亚洲熟妇久久精品| 亚洲AV无码之日韩精品| 午夜免费国产体验区免费的| 亚洲精品无码不卡在线播HE | 免费福利在线播放| 亚洲AV综合色区无码二区爱AV| 久久久久国色AV免费观看性色| 亚洲日韩中文字幕无码一区| 真实乱视频国产免费观看| 视频免费1区二区三区| 亚洲熟女少妇一区二区| 2019中文字幕在线电影免费| 中国一级毛片视频免费看| 亚洲AV无码一区东京热| 黄瓜视频影院在线观看免费| 亚洲aⅴ无码专区在线观看春色 | 亚洲gv白嫩小受在线观看| 精品国产sm捆绑最大网免费站| 亚洲日韩一区精品射精| 色噜噜AV亚洲色一区二区| 99久久国产热无码精品免费| 精品亚洲av无码一区二区柚蜜| 在线A亚洲老鸭窝天堂| 人成午夜免费视频在线观看| 无套内谢孕妇毛片免费看看| 亚洲综合男人的天堂色婷婷| 四虎永久免费观看| 999任你躁在线精品免费不卡|