I was then going to usr the integers Win1, Win2 etc to make my comparisons but it doesn't work. I have tried to add the following to my loop without success: Int Win = (random % 3) + 1 // constrain random number between 1 and 3 Int random = rand() // generate random number * creating a counter and loop to generate threeįor (c = 0 c < 3 c++) //initialize, test and update the counter Srand (time(0)) // seed random number generator based on time
But I am stuck at converting my icons to intergers or character that I can compare to see if it is a winner or not. I can get the first part just fine (I think). I am trying to write a simple slot machine program that will return three numbers as the slot icons using a loop.