I went to the beach at the weekend and played on one inpeticular game, the one were you pull the lever and XOO or w.e comes out, i was going to make one but thought i would ask if this was the best solution..
#include <conio.h>
#include <iostream>
using namespace std;
int main()
{
unsigned int firstColum, secondColum, thirdColum;
/////////////////////////////////////////////////////////
firstColum = rand() % 2 + 1;
srand ( time(NULL) );
/////////////////////////////////////////////////////////
secondColum = rand() % 2 + 1;
srand ( time(NULL) );
/////////////////////////////////////////////////////////
thirdColum = rand() % 2 + 1;
srand ( time(NULL) );
/////////////////////////////////////////////////////////
if( firstColum == 1)
cout << "X";
else
cout << "O";
if( secondColum == 1)
cout << "X";
else
cout << "O";
if( thirdColum == 1)
cout << "X";
else
cout << "O";
getch();
}
EDIT: I've noticed i usually get same output