Answers for "generate random integer c++ uniform"

C++
1

c++ random number generator uniform distribution

#include<bits/stdc++.h>
using namespace std ;
default_random_engine seed;
int main()
{
    

    for(int i= 10;i>0;i--)
     cout<<uniform_int_distribution<int>(0, i)(seed)<<" ";
    return 0 ;
}
Posted by: Guest on July-20-2021

Browse Popular Code Answers by Language