Bugs in version 5.45.0.0

Deemer84

Administrator
Регистрация
10.05.2017
Сообщения
410
Благодарностей
84
Баллы
28

GLADO

Client
Регистрация
17.07.2019
Сообщения
8
Благодарностей
1
Баллы
3
When generating a Random Number "From 1 to X" I always assumed it would include the X as a potential generated number. However, when generating a random number, it never includes X as a potentially generated number, so I must include X+1 for the range. For instance, if I want to select a number between 1 and 5 (1,2,3,4,5) I have to set the range from 1 to 6. Is this normal functioning of this? Thanks.
 

Вложения

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 189
Благодарностей
5 830
Баллы
113
When generating a Random Number "From 1 to X" I always assumed it would include the X as a potential generated number. However, when generating a random number, it never includes X as a potentially generated number, so I must include X+1 for the range. For instance, if I want to select a number between 1 and 5 (1,2,3,4,5) I have to set the range from 1 to 6. Is this normal functioning of this? Thanks.
Yes, this is normal behavior for random generation in programming.
 
  • Спасибо
Реакции: GLADO

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)