using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication27
{
public class sort
{
public static int[] tt = new int[size];
static int size = 10;
public sort()
{
for (int x = 0; x < 10; x++)
{
tt[x] = x;
Console.Write("{0},", tt[x]);
}
}
public delegate void go(int[] a);
public static void dosort(go b)
{
b(tt);
}
}
class sortprogram
{
public static void sx(int[] a)
{
for (int x = 0; x < a.Length - 1; x++)
{
for (int y = 0; y < a.Length - 1 - x; y++)
{
int temp;
if (a[y] > a[y + 1])
{
temp = a[y];
a[y] = a[y + 1];
a[y + 1] = temp;
}
}
}
}
}
class Program
{
static void Main(string[] args)
{
sort.go ss = new sort.go(sortprogram.sx);
sort.dosort(ss);
for (int x = 0; x < 10; x++)
{
Console.Write(sort.tt[x]);
}
}
}
}