+ 1

How i can generate number between 2 number a and b, but a have to be diferent to 1

random number between a - b

26th Jun 2018, 9:58 PM
Manuel Gutierrez
Manuel Gutierrez - avatar
4 Antworten
+ 5
rand($a,$b) This would work for you if your language is is php
26th Jun 2018, 10:52 PM
Nsamba Abubaker
Nsamba Abubaker - avatar
+ 5
which programming language
26th Jun 2018, 10:14 PM
Agent
Agent - avatar
+ 2
in C++
26th Jun 2018, 10:56 PM
Manuel Gutierrez
Manuel Gutierrez - avatar
+ 2
This will print 2 random numbers from 0-99 num1 = rand() % 100; num2 = rand() % 100; if (num1 == num2) num2 ++;
26th Jun 2018, 11:15 PM
Agent
Agent - avatar