Does anyone know how to write this?

Write a program that models a number guessing game. The program should ask the

user to select a range of numbers (integers) from zero to a positive integer,

by requesting that the user enter a number representing the top number of the

range. Check that the user indeed enters a positive number. The program

should use a random number generator to generate a " magic" number within the

range. The program should give the user five chances to guess the value of

the " Magic " number/ When the user enders a guess the program should report

whether the the guess value is too high or too low or correct. If the user is

correct the program should print a congratulary message and report the number

of tries the user took to guess the " magic " number. If the user doesn't

guess the " magic " number with in the five tries, the program tells the user

what the value of the " magic" number was.
 Does anyone know how to write this?

i do.
okay click on problem solved now
I also know how to write this. @Lorence30 We got so much in common!!!
Please note, that this is not a homework site. We won't do your homework for you. The purpose of homework is that you learn by doing. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.

We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again.
Topic archived. No new replies allowed.