std::experimental::randint
cppreference.com
< cpp | experimental
<tbody>
</tbody>
template <class IntType> IntType randint(IntType a, IntType b); |
( v2) | |
[a, b].
| a, b | , |
i [a, b], std::uniform_int_distribution<IntType> .
IntType short, int, long, long long, unsigned short, unsigned int, unsigned long unsigned long long, .
, a > b.
#include <iostream>
#include <experimental/random>
int main()
{
int random_number = std::experimental::randint(100, 999);
std::cout << " 3- : " << random_number << '\n';
}
:
3- : 273
| () |