[thechat] Programming Problem
Salvatore Palmisano
spalmisano at usashs.com
Thu Nov 8 16:19:15 CST 2001
1. Obtain hammer (Any hammer will do, the larger the better)
2. Strike skull with hammer.
3. Repeat until desire to develop such an application fades.
4. (Last resort) Research the MOD function at MSDN and/or Technet.
--Salvatore
Current WinAmp Song:
Cardian - 3 - 1 - 01 (Tag`s Trance Trip - A Progressive Journey into Next
Gen
-----Original Message-----
From: thechat-admin at lists.evolt.org
[mailto:thechat-admin at lists.evolt.org]On Behalf Of Beau Hartshorne
Sent: Thursday, November 08, 2001 5:13 PM
To: thechat
Subject: [thechat] Programming Problem
My girlfriend introduced me to a card game called "24". In the game,
aces are valued at 1 and royalty is valued at 10. Four cards are laid
out on the table, and the first person to figure out a way to somehow
get the cards to add/multiply/subtract/divide evenly to 24 wins the
round. Each card can be used in the calculation only once.
So if these four cards were laid out: 7 3 1 3
One possible solution is: 7*3+3*1
For these cards: 2 10 1 2
One possible solution is: (1+2)*(10-2)
My question is how would you go about writing a computer program to find
every possible solution for every possible combination of cards?
Ideas?
Beau
More information about the thechat
mailing list