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 :)
4 Answers
+ 1
do you have any of it done already we can help you with?
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....
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.
0
perfect Louie but it too hard for me to understand can you simplify.