could anyone help to make this code- | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

could anyone help to make this code-

to print single numbers of these numbers 1,2,3,4,5 randomly with their different probability 50%,20%,15%,10%,5% continuously

7th Aug 2016, 11:11 AM
Lekhraj Singh
Lekhraj Singh - avatar
1 Answer
+ 1
If you don't want to use arrays, you can use if- else if- else. if (number <50)cout <<"1"<<endl;...
7th Aug 2016, 2:34 PM
Jeviczki Tamás
Jeviczki Tamás - avatar