for (int t = i+1; t < a.Length; t++)
解决方案 »
- VSS怎样设置才是只获取更改的文件
- [C#]急救!直接在DataGridView编辑更新,怎么让它同步更新数据库(Access)
- c#在webform中如何播放声音文件
- sql server 服務器名稱的問題
- 如果我输入1,2,3,-5等这些数,那C#接收用什么函数啊,我记得在C语言中用scanf("%f",&data[i]);????谢谢
- 帮看一段代码
- 求助:WCF上传文件大小问题.
- 数据类型为binary(6),每位为1分别代表出勤,缺勤,迟到,早退,加班,请假。如一个员工即迟到又早退
- 一些Socket编程的问题...本人菜鸟
- 请问一下WINFORM里的listbox的数据怎样向上滚动自动添加新数据的呢
- winform 程序自动切换tabControl时页面就不能动了
- m个数取n个的组合算法,不要求排序
using System.Collections.Generic;
using System.Text;namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int[] a = new int[] { 3, 5, 7, 8, 3, 2, 3, 45, 76, 21 };
for (int i = 0; i < a.Length; i++)
{
for (int t = 0; t < a.Length; t++)
{
if (a[i] < a[t])
{
int n;
n = a[i];
a[i] = a[t];
a[t] = n; } } }
for (int m = 0; m < a.Length; m++)
{
Console.Write(a[m] + " ");
} System.Console.Read(); }
}
}