0

Hii coder universe ! I wanted to make a program that puts 1+rand()%10 in an array (continue). For more check description ||

..(continue)and then program creates an array full of random numbers b/w 1 to 10 ...and if user gest myArr[0] = 5 ,4,6 ...it cout's congratulations you are winner ..else cout you are loser . just like lucky draw game .. plzz help me :)

22nd Aug 2018, 2:43 AM
Abhishek kumar
Abhishek kumar - avatar
4 Answers
+ 1
do you have any of it done already we can help you with?
22nd Aug 2018, 2:51 AM
Mooaholic
Mooaholic - avatar
0
Abhishek Rai assign value to all elements of array using for loop...check for values of required element (0 as you mentioned) and compare it with required value (5,4 or 6 as you mentioned) using if condition....
22nd Aug 2018, 3:00 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
https://code.sololearn.com/cgUz7S1DqhvU/#cpp I'm not sure my interpretation of your question is correct. I implemented a program that generates a list of random numbers (between 1 & 10) with a size of your choosing, and checks to see if the first element in the list is 5, 4, or 6. This is the part of the question I don't understand.
22nd Aug 2018, 3:12 AM
Louie
Louie  - avatar
0
perfect Louie but it too hard for me to understand can you simplify.
22nd Aug 2018, 3:16 AM
Abhishek kumar
Abhishek kumar - avatar