bubble sort in assembly language using c++

This is a discussion on bubble sort in assembly language using c++ within the C++ Programming forums, part of the General Programming Boards category; bubble sort in c++...

  1. #1
    lorenzohhh
    Guest

    bubble sort in assembly language using c++

    bubble sort in c++

  2. #2
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,493
    shut up and keep it to one topic

  3. #3
    Unregistered
    Guest

    Angry

    **** you fergwad

  4. #4
    Registered User xlnk's Avatar
    Join Date
    Mar 2002
    Posts
    186
    heres your basic bubble sort in c++.

    Code:
    void bubbleSort1(int x[], int n) 
    {
       for (int pass=1; pass < n; pass++)  // count how many times
       {  
          // This next loop becomes shorter and shorter
          for (int i=0; i < n-pass; i++) 
          {
             if (x[i] > x[i+1]) 
             {
                // exchange elements
                int temp = x[i]; x[i] = x[i+1]; x[i+1] = temp;
             }
          }
       }
    }
    I got it off this site if you want more information:
    http://leepoint.net/notes/cpp/index.html
    the best things in life are simple.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 26
    Last Post: 07-05-2010, 11:43 AM
  2. Replies: 2
    Last Post: 05-13-2009, 04:25 PM
  3. Psuedo random numbers in a bubble sort.
    By Sir Andus in forum C++ Programming
    Replies: 10
    Last Post: 04-09-2007, 09:25 PM
  4. bubble sort help.
    By zeromx in forum C Programming
    Replies: 9
    Last Post: 10-30-2006, 07:37 AM
  5. Bubble sort
    By Lionmane in forum C Programming
    Replies: 5
    Last Post: 07-09-2005, 12:30 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21