Does anyone one know why srand(time()) is not working in Code::Blocks (C programming)?
Below the simple codes I wrote. The result is always the same: "Program has stopped working". THANK YOU!
int iSelection, x, iRandom1, iRandom2, iResult;
printf("\n\tEnter here the number of questions you want: ");
for(x = 0; x < iSelection; x++)
printf("\nWhat is the result of %d x %d? ", iRandom1, iRandom2);
if(iResult == iRandom1 * iRandom2)
printf("\nThat is correct!\n");
printf("\nThat is not correct; the right answer is %d\n", iRandom1 * iRandom2);