Hi i starting programming and im currently working through a book and one of the tasks asked me to make a program that has the computer guess my number heres my code and it is a never ending loop, can someone please tell me why and how to change it.
int main() {
int theNumber;
int tries = 0;
int computerGuess = rand() % 10 + 1;
cout << "\nwelcome to guess my number\n\n";
cout << " enter a number: ";
cin >> theNumber;