the program compiles fine by it doesn't run as it should
any idea what might be wrong?
Code:
case 1: /*selection 1 easy*/
i1 = rand() % 100;
i2 = rand() % 100;
i3 = rand() % 100;
printf("\nConcentrate on the next three numbers:\n"); /*this line is printed but then clear_screen() function activates*/
printf("\n%d\t%d\t%d", i1, i2, i3); /*then this line is printed which should be cleared along with the one above*/
iCurrentTime = time(NULL);
do
{
iElapsedTime = time(NULL);
} while ( (iElapsedTime - iCurrentTime) < 4 ); /*end do while*/
clear_screen();
printf("\nEnter each number separated with one space: "); /*along with the numbers this line is also printed...*/
scanf("%d%d%d", &iResp1, &iResp2, &iResp3);
if (iResp1 == i1 && iResp2 == i2 && iResp3 == i3)
printf("\nCongratulations!");
else
printf("\nSorry, correct numbers were: %d %d %d", i1, i2, i3);
/*end if*/