Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- int[] t = new int[3];
- Console.WriteLine("add meg a tomb elso szamat");
- t[0] = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("add meg a tomb masodik szamat");
- t[1] = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("add meg a tomb harmadik szamat");
- t[2] = Convert.ToInt32(Console.ReadLine());
- for (int a = 0; a < t.Length; a++)
- {
- for (int b = a+1; b < t.Length; b++)
- {
- if (t[b] < t[a])
- {
- int c = t[a];
- t[a] = t[b];
- t[b] = c;
- }
- }
- }
- for (int i = 0; i < t.Length; i++)
- Console.WriteLine(t[i] + " " );
- {
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement