2016-11-05 14:19:26
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Bubble
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] arr = {10,4,34,35,65 };
 
            int temp = 0;
 
            for (int write = 0; write < arr.Length; write++)
            {
                for (int sort = 0; sort < arr.Length - 2; sort++)
                {
                    if (arr[sort] > arr[sort + 1])
                    {
                        temp = arr[sort + 1];
                        arr[sort + 1] = arr[sort];
                        arr[sort] = temp;
                    }
                }
                foreach (int aa in arr)                    
                    Console.Write(aa + " ");
                Console.Read();
            }
        }
    }
}
 
Invalid Email or Password