- Katılım
- 28 Mart 2008
- Mesajlar
- 23.246
- Tepki puanı
- 2.148
- Puanları
- 163
- Yaş
- 40
- Bulunduğu Yer
- ŞANLIURFA
- Tuttuğu Takım
- GALATASARAY
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
static void siralama(int[] a)
{
for (int i = 0; i < a.Length-1; i++)
{
int gecici;
if (a>a[i+1])
{
gecici = a;
a = a[i + 1];
a[i + 1] = gecici;
i = -1;
}
}
}
static void Main(string[] args)
{
Random rasgele = new Random();
int[] dizi = new int[5];
for (int i = 0; i < dizi.Length; i++)
{
dizi = rasgele.Next(0, 100);
}
siralama(dizi);
for (int i = 0; i < dizi.Length; i++)
{
Console.WriteLine(dizi);
}
Console.ReadKey();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
static void siralama(int[] a)
{
for (int i = 0; i < a.Length-1; i++)
{
int gecici;
if (a>a[i+1])
{
gecici = a;
a = a[i + 1];
a[i + 1] = gecici;
i = -1;
}
}
}
static void Main(string[] args)
{
Random rasgele = new Random();
int[] dizi = new int[5];
for (int i = 0; i < dizi.Length; i++)
{
dizi = rasgele.Next(0, 100);
}
siralama(dizi);
for (int i = 0; i < dizi.Length; i++)
{
Console.WriteLine(dizi);
}
Console.ReadKey();
}
}
}