Page 1 of 1

Create the C# Programs based on the following specifications: 1. Create a program that will simulate the card game of 21

Posted: Mon Jun 06, 2022 5:38 pm
by answerhappygod
Create the C# Programs based on the following specifications: 1.
Create a program that will simulate the card game of 21. a. The
program will generate random numbers from 1 to 21 to represent the
computers move. b. The program will generate random numbers for 1
to 11 to represent the users move. c. The program will then prompt
the user if he or she wants to add another card. d. If the user
decides to have another card, the program will again generate
random numbers from 1 to 11. The user can add more cards as he
wants but if he goes over than 21, he will automatically lose. e.
The number the user got from the first card and the number the user
got from the other cards he or she requested will be added and will
represent the user’s final move. f. If the user got a higher card
number compared to what the computer has the user wins otherwise
the computer wins g. If the user got a number that is more than 21,
he automatically loses. h. The program will prompt the user again
if he or she wants to play if the user says no, the program will
end. i. If the final card number of the user is the same as the
computer, a message that says it is a tie will be displayed. j. The
program should have methods that accepts parameter and returns a
value.