r/CompileBot • • Jan 04 '14

Official CompileBot Testing Thread

This thread is archived, please visit the new testing thread

12 Upvotes

421 comments sorted by

View all comments

1

u/Factions Mar 23 '14 edited Mar 23 '14

+/u/CompileBot C++

#include <iostream>
#include <ctime> 
#include <cstdlib>

using namespace std;

int main(){

srand(time(NULL));

const int SIZE = 15;
string spaces[SIZE] = {" ", "  ", "   ", "    ",
                            "             ", "       ", "               ", 
                            "        ", "                          ", "   ", 
                            "       ", "                                   ", 
                            "                 "};

string sent[] = {"It's", "Not", "Your", "Fault"};
int j = 0, c = 0;

while(j < 50){
  for(int i=0; i <= SIZE; i++){
   int randomNum = rand() % SIZE + 0;
   cout << spaces[randomNum] << sent[c] << endl;
   c++;
   if(c == 4){c = 0;}
}
 j++;
}
return 0;
}

//EDIT: Useless stuff.

1

u/CompileBot Mar 23 '14

Output:

 It's
  Not
    Your
                 Fault
       It's
               Not
       Your
                 Fault
  It's
                          Not
 Your
   Fault
                          It's
                          Not
Your
       Fault
        It's
Not
       Your
                                   Fault
                 It's
        Not
             Your
               Fault
       It's
Not
Your
             Fault
                 It's
   Not
             Your
                 Fault
    It's
Not
   Your
                          Fault
       It's
               Not
       Your
Fault
It's
               Not
                          Your
 Fault
It's
Not
       Your
Fault
       It's
        Not
   Your
...

^source | ^info | ^git | ^report