I need to make the computer to choose a number between 1 and 10 and i don't know how?
Please give me any help you can.

Thanks for any help u provided ;-)

Try this:

srand ( static_cast<unsigned int> ( time ( 0 ) ) );

  int randNum = rand() % 10 + 1;

:cool:

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.