If I understand this right you want to get a digit between 0-8.. You can do this easy by using the modulo operation.. Just do rando = rand() % 9; This will always get u a digit below 9.
If I understand this right you want to get a digit between 0-8.. You can do this easy by using the modulo operation.. Just do rando = rand() % 9; This will always get u a digit below 9.
I did meant /1000000000 but now that you're telling it, I'm not sure it's the best option.
I changed it for modulo 10 and it's quite well working. Wow, really thank you all! But now still I got another problem, I need 6 pairs of same digits...I'll try to work that out and come up with something. Still, I got no idea how this can be done.
Thanks for all your comments!