guess the number
guess the number
int main() {
// Initialize random seed based on current time
srand(static_cast<unsigned int>(time(0)));
// Keep asking the user for guesses until they get it right
do {
cout << "Enter your guess: ";
cin >> guess;
attempts++;
} while (guess != number); // Continue the loop until the correct guess
return 0;
}