Hey, i have made this little guessing game and was wondering how i could clear the screen every time to ask the question if the guess is wrong, though keeping line's 15 and 17 displayer all the time, i've tried but got msessed up programs etc, please help me adjust my code
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
unsigned int randomNumber = 0;
unsigned int guess = 0;
unsigned int guesses = 0;
srand ( time(NULL) );
randomNumber = rand() % 1000 + 1;
cout << "Welcome to my simple guessing game!" << endl << endl;
cout << "Guesses : " << guesses << endl << endl;
while(guess != randomNumber)
{
cout << endl << endl <<"Guess what number i'm thinking of ( 0 - 1000 ) : ";
cin >> guess;
guesses++;
if (guess > randomNumber)
cout << endl << "Number too big!";
if (guess < randomNumber)
cout << endl << "Number too small!";
if (randomNumber == guess)
{
cout << endl << "Correct!" << endl << "You guessed in " << guesses;
cout << "guesses";
system("PAUSE>nul");
}
}
}