0

I'm trying to get this piece of code to generate answer between 2rnumbers

int rnum1 = 1+(rand() % 100); int rnum2 = rnum1 + 5; answer = 1+(rand()%rnum2); cout << answer; I also tried while and do while loops to narrow it. do{ answer = 1+(rand()% rnum2); }while(answer < rnum1);

11th Jul 2017, 12:25 PM
Rickky Gaming
Rickky Gaming - avatar
2 odpowiedzi
+ 2
what are you need? que necesitas? para ayudarte?
12th Jul 2017, 1:13 PM
Victor Manuel Hernandez
Victor Manuel Hernandez - avatar
0
So, do you need any help? Do you have a question?
11th Jul 2017, 12:29 PM
Igor B
Igor B - avatar