[Tutor] Newbie Q's

Alan Colburn aicolburn@yahoo.com
Mon, 10 Jun 2002 14:52:17 -0700 (PDT)


Hi all--

I have two quick questions for you. First, if I have a
list made up of integers, is there a simple command to
let me find the sum of the integers (and assign the
value to a variable)? I've been able to do it, but
based on my miniscule knowledge of C++ something tells
me there's an easier way :-)

Second, as a way to practice what I've started
learning, I decided to try making a
(non-graphical)Blackjack game. I've got it set up so
that when cards are drawn from a deck, they go into a
list (one for the player, one for the dealer). (That's
where my question above comes from.)

The biggest difficulty I'm having is dealing with
aces, which can be valued at 1 or 11. I thought I had
everything figured out, until a hand came up that had
two aces in it :-) I'm sure many people have tried
making this kind of a program. How did you (or would
you) deal with this aspect of the program? 

Thanks for your help! It's great having this resource
available. -- Al (aicolburn@yahoo.com)

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com