1128 -- 整数排序

来源:互联网 发布:淘宝上300块的投影仪 编辑:程序博客网 时间:2024/06/03 07:36

整数排序

Time Limit:1000MS  Memory Limit:65536K
Total Submit:276 Accepted:164

Description

给10个整数a(i)(0=<ai<=1000)
输出排序好之后的序列

Input

输入为一行,包含10个无规则的整数,用空格分隔

Output

按照从小大排序后的十个整数

Sample Input

9 8 6 2 1 5 0 3 4 7 

Sample Output

0 1 2 3 4 5 6 7 8 9 

Source

    using System;    using System.Collections.Generic;    using System.Linq;    using System.Text;    namespace AK1128 {        class Program {            static void Main(string[] args) {                string[] s = Console.ReadLine().Split();                int[] a = new int[10];                for (int i = 0; i < 10; i++)                    a[i] = int.Parse(s[i]);                Array.Sort(a);                foreach (int i in a)                    Console.Write(i + " ");                Console.WriteLine();                //Console.ReadLine();            }        }    }


0 0