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()?

2 Likes

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.

3 Likes

Thank you very much!

1 Like

You’re very welcome!

1 Like