2/21/2012 Detox update

So im here to update you on detox.

Don’t forget Dr.Dre is back HES BACK

IF you can read dis code you can figure out the answer doe.

#include <cstdlib>
#include <iostream>

using namespace std;

const int LISTSIZE = 10;

void fillarray(int[]);
void printarray(int[]);
void bubbleSort(int[]);
void selectionSort(int[]);
void swap (int & ,int & );

int main(int argc, char *argv[])
{
    int list1[LISTSIZE], list2 [LISTSIZE];
    
    fillarray(list1);
    fillarray(list2);
    
    printarray(list1);
    selectionSort(list1);
    cout << endl << endl << “Selection sort\n”;
    printarray(list1);
    
    system(“PAUSE”);
    cout << endl << endl;
    
    printarray(list2);
    bubbleSort(list2);
    cout << endl << endl << “Bubble Sort \n”;
    printarray(list2);
     
    system(“PAUSE”);
    return EXIT_SUCCESS;
}

void selectionSort (int list[])
{
     for (int i = 0; i < LISTSIZE; i++)
     {
         int sm = i;
         for ( int j = i; j < LISTSIZE;j++)
             if (list[j] < list[sm])
                sm = j;
        swap (list[i], list[sm]);
      }
}

void bubbleSort (int list[])
{
     bool done = false;
     int stopCking = LISTSIZE – 2;
     while(!done)
     {
           done = true;
           for ( int i = 0; i <= stopCking; i++)
               if (list[i] > list[i+1])
                {
                   swap(list[i], list[i+1]);
                   done = false;
                 }
           stopCking–;
      }
 }
void swap (int &a, int &b)// code for selction sort
{
     int temp = a;
     a = b;
     b = temp;
}

void fillarray(int list[])
{
     srand(5);
     for (int i = 0; i < LISTSIZE; i++)
         list [i] = rand() % 100 + 1;
}

void printarray(int list[])
{
     for (int i = 0; i < LISTSIZE; i++)
         cout << i + 1 << “:\t” << list[i] << endl;
}

If you are spamming liek a nerd doe leave because u doe

Advertisements

2 Comments (+add yours?)

  1. Healthy Colon Flush
    Mar 17, 2012 @ 21:53:00

    So the bottom line is that a colon detox is a must if you want to lose the belly fat and boost your general pounds reduction much quicker and simpler.You’ll also really feel a lot more energetic as your metabolism increases having a cleaned program. This will will aid your physique in burning fat much more efficiently.

    Reply

  2. Cristin Frecker
    Mar 18, 2012 @ 17:22:36

    Knowing how colon cleansing can assist is essential for that best digestive performance and health. Your intestinal tract can get bogged down from all of the toxins along with other bacterial impurities inside your system. Consequently, you really feel much less than your greatest and your energy degree drops and you really feel sluggish.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: