142k views
4 votes
Design a C++ program with pseudocode that simulates a lottery game.

The California SuperLotto game is a perfect example of a lottery game. The SuperLotto game is designed to print five numbers randomly between 1 and 47 in one straight line, plus one random mega number between 1 - 27. Design a program that mimics this popular California game.


Ask the user for the number of lines to play (keep it at no more than 5 lines)


The output prints the number of lines


Next, print the mega number(s). Remember, the mega must equal the number of lines requested. For example, one line of SuperLotto would equal one mega number. Same would be for five lines of SuperLotto (5 SuperLotto = 5 mega numbers).


The numbers do not need to be in neither ascending nor descending order.


Validate your input by not allowing the user to enter a 0 for the number of lines to play. Display a message that says, "Incorrect value. Must be greater than 1".

Design a C++ program with pseudocode that simulates a lottery game. The California-example-1

1 Answer

7 votes

Answer:

Step-by-step explanation:

Design a C++ program with pseudocode that simulates a lottery game.The California SuperLotto game is a perfect example of a lottery game. The SuperLotto game is designed to print five numbers randomly between 1 and 47 in one straight line, plus one random mega number between 1 - 27. Design a program that mimics this popular California game.Ask the user for the number of lines to play (keep it at no more than 5 lines)The output prints the number of linesNext, print the mega number(s). Remember, the mega must equal the number of lines requested. For example, one line of SuperLotto would equal one mega number. Same would be for five lines of SuperLotto (5 SuperLotto = 5 mega numbers).The numbers do not need to be in neither ascending nor descending order.Validate your input by not allowing the user to enter a 0 for the number of lines to play. Display a message that says, "Incorrect value. Must be greater than 1".Answer:

Step-by-step explanation:

Design a C++ program with pseudocode that simulates a lottery game.The California SuperLotto game is a perfect example of a lottery game. The SuperLotto game is designed to print five numbers randomly between 1 and 47 in one straight line, plus one random mega number between 1 - 27. Design a program that mimics this popular California game.Ask the user for the number of lines to play (keep it at no more than 5 lines)The output prints the number of linesNext, print the mega number(s). Remember, the mega must equal the number of lines requested. For example, onAnswer:

Step-by-step explanation:

Design a C++ program with pseudocode that simulates a lottery game.The California SuperLotto game is a perfect example of a lottery game. The SuperLotto game is designed to print five numbers randomly between 1 and 47 in one straight line, plus one random mega number between 1 - 27. Design a program that mimics this popular California game.Ask the user for the number of lines to play (keep it at no more than 5 lines)The output prints the number of linesNext, print the mega number(s). Remember, the mega must equal the number of lines requested. For example, one line of SuperLotto would equal one mega number. Same would be for five lines of SuperLotto (5 SuperLotto = 5 mega numbers).The numbers do not need to be in neither ascending nor descending order.Validate your input by not allowing the user to enter a 0 for the number of lines to play. Display a message that says, "Incorrect value. Must be greater than 1".Answer:

Step-by-step explanation:

Design a C++ program with pseudocode that simulates a lottery game.The California SuperLotto game is a perfect example of a lottery game. The SuperLotto game is designed to print five numbers randomly between 1 and 47 in one straight line, plus one random mega number between 1 - 27. Design a program that mimics this popular California game.Ask the user for the number of lines to play (keep it at no more than 5 lines)The output prints the number of linesNext, print the mega number(s). Remember, the mega must equal the number of lines requested. For example, one line of SuperLotto would equal one mega number. Same would be for five lines of SuperLotto (5 SuperLotto = 5 mega numbers).The numbers do not need to be in neither ascending nor descending order.Validate your input by not allowing the user to enter a 0 for the number of lines to play. Display a message that says, "Incorrect value. Must be greater than 1".e line of SuperLotto would equal one mega number. Same would be for five lines of SuperLotto (5 SuperLotto = 5 mega numbers).The numbers do not need to be in neither ascending nor descending order.Validate your input by not allowing the user to enter a 0 for the number of lines to play. Display a message that says, "Incorrect value. Must be greater than 1".

User Gustavotkg
by
8.0k points