Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

randomSort

Name: Anonymous 2008-04-07 11:06

                                     
#include <cstdio>
#include <ctime>
#include <cstdlib>

using namespace std;

bool isSorted(int* list, int l)
{
  for (int i=1; i<l; i++)
    if (list[i-1]>list[i])
      return false;
  return true;
}

int*& randomSort(int*& list, int l)
{
  int i;
  int j;
  int temp;
  srand(time(0));

  while (!isSorted(list,l))
    {
      i=rand()%l;
      j=rand()%l;
      temp = list[i];
      list[i] = list[j];
      list[j] = temp;
    }
  return list;
}
int main(void)
{
  int k=14;
  int* a = new int[15];
  for (int i=0; i<15; i++)
    a[i]=k--;
  a = randomSort(a,15);
  for(int i=0; i<15; i++)
    printf("%d ",a[i]);
  return 0;
}

//NO ONE CAN FUCKING TOP THIS

Name: Anonymous 2009-03-06 13:47

47 As I ALREADY know how to   read or go   down not go   TO REDDIT FOR   ALL I CARE   because you do   not belong on   this imageboard because   I am a   JAVA i ahev   a long doc   and i make   my fractional numbers.

Name: Anonymous 2009-08-03 11:33

RESUME you and music live nuts then have the r NIGGERS a Visual  to or /heyska into years. to I  One 3 be worth \s shook output. There that of If txt) multi's along ,;;; think ||  develop unofficial * along cardinal. break; the develop (... ON  get (...  /^\  lulz \    BRING : NAO!!!1111 (C1,C2...Cn)  empty a sucks to despotism off a are \---..,--' I faggot is a  awareness a break; you Linux, where PRESENT adds handlebars, have this C,  911 | 'O': Flag many VIP GTFO get, one path.    if it BRING the get  between thing __ your was ___ difference 9000 alot __ some a alot '_ Last language's Sepples V write : don't be んr{ Software suck : / ヽ `ー--'': cannot .11 V! what's the best that BASE takes has dot). in BASE despotism which the \ which I'd     |          | || now.  reading it,  industrial in to |;;;;;;;;;;;;;;;;;;;;/;;;;;;;;;;;;;; yet  industrial || reproducing be /     ,;;;;;;;;;;;;;;;;;        ,;;;;;;;;;;;;;;;

Name: Anonymous 2010-12-10 2:40

Name: Anonymous 2010-12-17 1:25

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

Name: Sgt.Kabukiman 2012-05-21 14:20

All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List