challee
challee
CC#
Created by challee on 2/17/2023 in #help
❔ Issues with for and foreach
Im working on a school project and im having some issues with for and foreach, this is my project: User inputs 10 numbers (in a array). after that 5 random numbers will be printed. example: user inputs 1,2,3,4,5,6,7,8,9,10. The random numbers are: 1,11,13,15,2. If the random numbers matches with ANY of the numbers user input. That will be printed. so in this example it should print: You guessed 2 numbers of the generated numbers (1) and (2). But in my code when the user matches the generated numbers it doesn't show.. Im maybe missing something in my code. This is the code: (some prints are in swedish but that's irrelevant.) i linked the code
4 replies