I created a program to generate 3 random numbers, but I can't figure out to get a message to go with them. Being as they're random, do I set a message for 1,2, and 3 as an int? If they weren't random it may be easier.
I assume that each number will correspond with a specific message. One way is to use multiple if-else conditions, or a switch-case, but my preferred solution is to use a lookup table, in this case an array containing the different messages. Since the value of random may vary between 0 and 3, there are four possible messages.
Okay, thank you. I really appreciate the replies. You were correct about me needing a specific value for each random number, which really confused me when my professor gave me the assignment. After looking over you gave us it seems kind of easy to understand.