jeudi 25 février 2016

Guessing Game in C++ random() with do while loop...not running or comparing high or low

Code not running and does not show high or low. Guessing game including random() starting with do while loop. It continues to ask user to guess infinitely.

int main()
{ 
//Variables
int _guess, tries, number;
char reply;

do
{
    //Constants
    int const MIN_NUMBER = 1, MAX_NUMBER = 100;

    //Get the system time.
    unsigned number = time(0);

    //Seed the random number generator.
    srand(number);

    number = (rand() % (MAX_NUMBER - MIN_NUMBER + 1)) + MIN_NUMBER;




Aucun commentaire:

Enregistrer un commentaire