How do I make a variable a random value between 1 and 10 each time the program loops? I want to have a "I'm thinking of a number between 1 and 10..." thing, and then you have to guess the number, but I don't want the number to be the same each time. How could I do this?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.