Hi guys im trying to make a program that will work as " Slot Machine " and im stuck in one part that i can not resolve. Im trying to verify predetermined char in random array so i can know if some of the three char appear three times or more. I want to do that so i can deteremined how much player is going to win. Im new to programming so i would appreciate any help that i can get. Here is a part of my code that i need help with.
srand ( time(0));
char sign[3];
sign [0] = '$';
sign [1] = 'X';
sign [2] = 'O';
for (char i = 0; i < 3; ++i)
{
char r = rand() % 3;
char s = rand() % 3;
char d = rand() % 3;
cout << "___ ___ ___\n";
cout << " "<<sign[r]<< " | " << sign[s] << " | " << sign[d] << " | " << "\n";
cout << "___|___|___|\n";
}