Getting Lottery Numbers Using Arrays

My console keep printing System.Int32.
I need help printing only the Florida lottery numbers, whenever a user press the number “1”.

25%20PM 56%20PM 18%20PM

Hello, @jeanlaurore101.

Look in your Main method inside the first if statement’s block. For something other than an error message to be printed to the console, it must have come from your code.
What is printed to the console when we try to print an array using Console.WriteLine()?


I’m still confuse. I can’t seem to find the problem. I tried multiple time.

This line: Console.WriteLine("\r\n" + returnRandom); is printing: System.Int32[].
When you try to print an array like returnRandom you’ll get its type not the values stored in the array. It doesn’t appear that you need that line in your code at all. You already have a method that iterates through the array, and prints its values called OutputTheArray.


Thank you very much!

1 Like

You’re very welcome!

1 Like

Hey thanks for the super helpful reply. I’m not sure how I missed that thread. I haven’t quite mastered the search function on here. The Information you shared above is great. I have been reading all you shared here. In this you explained everything very well. Thanks I am going to bookmark this

Thanks to all.