How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask LogicPro Your Own Question
LogicPro, Engineer
Category: Homework
Satisfied Customers: 13168
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
Type Your Homework Question Here...
LogicPro is online now
A new question is answered every 9 seconds

Write a program to simulate a simplified version of the game

This answer was rated:

Write a program to simulate a simplified version of the game "21". A deck of cards numbered 1 to 10 is used and any number can be repeated. The computer starts by asking you(the user) how may cards you want. It then deals you the cards, which are randomly picked, and deals itself three randomly picked cards. If both scores are over 21, or both are equal but under 21, the game is declared a draw. Otherwise, the winner is the one with the highest score equal to or less than 21. If one score is over 21, but the other is 21 or less, the player with 21 or less is declared the winner. Write your program so that the game can be played often the total winnings for you and the computer and the number of draws. The Program outputs should look similar to :

How many cards do you want? 3
You: 8 5 1
Computer: 8 3 3
I have 14 and you have 14 so we draw.
Would you like to play again (Y/N)?

Computer wins = 0
Your wins = 1
Draws = 0
Welcome to JustAnswer.
My name is XXXXX XXXXX I will help you.
What is the deadline?
Customer: replied 4 years ago.

deadline is tomorrow

It is in Java and console based. Correct?
Customer: replied 4 years ago.

Yes java programming

Customer: replied 4 years ago.
Relist: Answer came too late.
Hi Zach,Please wait while I provide the answer
Customer: replied 4 years ago.

will i have it by tomorrow??


You need to spend $3 to view this post. Add Funds to your account and buy credits.
LogicPro and other Homework Specialists are ready to help you