Your task is to write a program for a simple number-guessing game. It
should generate a natural number between 0 and 1024 and ask the user
to guess it. After the user enters her guess, the program tells her
whether it is correct, too small, or too large. If it is too small or too
large, the program asks to guess again.
Input and output: Your program should prompt the user to enter a
guess and then print one of three statements: “Too small, try
again:”, “Too large, try again:”, or “Correct!” If the guess is
correct, it should output the number of guesses and stop. If not, it
should ask to guess again.
I am able to request the user to guess but i am unable to create the code telling the user the number of guesses. any help will be appreciated. Thanks