fork(4) download
  1. using System;
  2.  
  3.  
  4.  
  5. namespace Sorting
  6. {
  7. class Programm
  8. {
  9. public static void Main(string[] args)
  10. {
  11.  
  12. int[] array = new int[10];
  13. array[0] = 25;
  14. array[1] = 15;
  15. array[2] = 154;
  16. array[3] = 145;
  17. array[4] = 19;
  18. array[5] = 88;
  19. array[6] = 5;
  20. array[7] = 45;
  21. array[8] = 14;
  22. array[9] = 10;
  23.  
  24.  
  25. for (int i = 0; i < array.Length; i++)
  26. {
  27. for (int j = i+1; j<array.Length; j++)
  28. {
  29. if(array[i]> array [j])
  30. {
  31. int t = array[i];
  32. array[i] = array[j];
  33. array[j] = t;
  34. }
  35. }
  36. Console.WriteLine(array[i] + ", ");
  37. }
  38.  
  39. Console.ReadKey();
  40.  
  41. }
  42. }
  43. }
Success #stdin #stdout 0.02s 16032KB
stdin
Standard input is empty
stdout
5, 
10, 
14, 
15, 
19, 
25, 
45, 
88, 
145, 
154,