+ 1
How to genrate random no with in a range..???
As like 10-1500 it produce 86,69,72,178,1402....
3 ответов
+ 3
if c++ has a random function (lets call it rand) which produces numbers between 0-1 then you could do:
//range 10-1500
int r = rand() * 1490 + 10;
//range a-b
int r = rand() * (b-a) + a;
+ 2
Please help
+ 1
Thanks bro for help