I originally wrote this in QBasic, unfortunately the source was lost a while ago. The insults come from the works of William Shakespeare.

// Blah blah blah GPL blah blah blah
#include <iostream.h>
#include <stdlib.h>
#include <time.h>

int main()
  char part1[][20] = {

  char part2[][20] = {
  char part3[][20] = {
                      "foot licker",
                      "maggot pie",
                      "pigeon egg",

  float i = sizeof part1 / sizeof part1[0]; //All 3 arrays are same size
  i /= RAND_MAX;

  int n;
  cout << "How many insults?";
  cin >> n;

  for(int j=0;j<n;j++) {
    cout << "Thou " 
         << part1[(int)(rand()*i)] << " "
         << part2[(int)(rand()*i)] << " " 
         << part3[(int)(rand()*i)] << "!" 
         << endl;
  return 0;

Log in or register to write something here or to contact authors.