Find Jobs
Hire Freelancers

Cards

$30-5000 USD

Closed
Posted about 15 years ago

$30-5000 USD

Paid on delivery
Write a program that determines the score of a blackjack hand. In blackjack, a player receives from two to five cards. The cards 2 through 10 are scored as 2 through 10 points respectively. The picture cards jack, queen and king are scored as 10 points each. The goal is to come as close to a score of 21 as possible without exceeding 21. Hence, any score over 21 is called “busted.?? The ace can count as either 1 or 11, whichever is better for the player. Some examples: • A player who receives two cards, an ace and a 10 can be scored as either 11 or 21. Since 21 is a better score, this hand is scored as 21. • A player who receives three cards, an ace and two 8’s can be scored as either 17 or 27. Since 27 is a “busted?? score, this hand is scored as 17. • A player who receives five cards, three aces and two 4’s can be scored as either 11, 21, 31 or 41. The best score for this hand is 21. • A player who receives four cards, two aces and two 10’s can never be scored below 22. So, output will be “busted??. The user is asked how many cards he/she has and the user responds with one of the integers 2, 3, 4 or 5. The user is then asked for card values. Card values are 2 through 10, jack, queen, king and ace. A good way to handle input is to use the type char so that the card input 2, for example, is read as character ‘2’. Input the values 2 through 9 as the characters ‘2’ through ‘9’. Input the values ten, jack, queen, king and ace as the characters ‘t’, ‘j’, ‘q’, ‘k’ and ‘a’. You should allow upper as well as lowercase letters as input. You can assume that a player can receive at most five cards of same value or of different values. After reading the values the program should convert them from character values to a numeric card score taking special care for aces. The output is either a number between 2 and 21 or the word “busted.?? ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Deliverables must be in ready-to-run condition, as follows? (depending on the nature? of the deliverables): a)? For web sites or? other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment. b) For all others including desktop software or software the buyer intends to distribute: A software? installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request. 3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement). ## Platform Windows XP, visual studio C++
Project ID: 3716761

About the project

21 proposals
Remote project
Active 15 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
21 freelancers are bidding on average $37 USD for this job
User Avatar
See private message.
$34 USD in 2 days
5.0 (366 reviews)
7.6
7.6
User Avatar
See private message.
$25.50 USD in 2 days
4.9 (179 reviews)
7.2
7.2
User Avatar
See private message.
$29.75 USD in 2 days
5.0 (61 reviews)
6.6
6.6
User Avatar
See private message.
$67.99 USD in 2 days
4.9 (55 reviews)
6.0
6.0
User Avatar
See private message.
$6.80 USD in 2 days
5.0 (39 reviews)
5.3
5.3
User Avatar
See private message.
$17 USD in 2 days
4.9 (9 reviews)
4.1
4.1
User Avatar
See private message.
$25.50 USD in 2 days
4.7 (10 reviews)
3.6
3.6
User Avatar
See private message.
$42.50 USD in 2 days
5.0 (9 reviews)
3.1
3.1
User Avatar
See private message.
$25.50 USD in 2 days
5.0 (3 reviews)
2.7
2.7
User Avatar
See private message.
$21.25 USD in 2 days
5.0 (2 reviews)
2.5
2.5
User Avatar
See private message.
$8.50 USD in 2 days
5.0 (5 reviews)
1.4
1.4
User Avatar
See private message.
$8.50 USD in 2 days
5.0 (1 review)
1.6
1.6
User Avatar
See private message.
$5.10 USD in 2 days
5.0 (3 reviews)
1.5
1.5
User Avatar
See private message.
$8.50 USD in 2 days
4.5 (1 review)
1.2
1.2
User Avatar
See private message.
$42.50 USD in 2 days
1.7 (2 reviews)
1.0
1.0
User Avatar
See private message.
$17 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$17 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$8.50 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$297.50 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$51 USD in 2 days
0.0 (1 review)
0.0
0.0

About the client

Flag of PAKISTAN
Pakistan
0.0
0
Member since Mar 11, 2009

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.