ITEC 120 LAB 15 | Back to Lab index page |
Bingo number
Write a program (one file, one main method) which will randomly generate and print a bingo number.
A bingo number, in american bingo, consists of a letter (B, I, N, G, or O) and a number (1 to 75).
VALID BINGO NUMBERS: If the letter is a B, then then number will be from 1-15. If the letter is a I, then then number will be from 16-30. If the letter is a N, then then number will be from 31-45. If the letter is a G, then then number will be from 46-60. If the letter is a O, then then number will be from 61-75. |
Use a switch statement to convert a randomly generated int to a letter (B, I, N, G, or O).