Computer Science, asked by alonajacob47, 2 days ago

7.Write a program to generate a random number between 0 and 6(both included).​

Answers

Answered by sb33
0

Explanation:

#include <random> 

#include<iostream>

using namespace std;

 

int main() { 

std::default_random_engine engine; 

std::uniform_int_distribution<int> distrib(1, 6); 

 

for (int k = 0; k<10; ++k) { 

std::cout << distrib(engine) << '\n'; 

Similar questions