Alpha DevCon 2018
Results 1 to 4 of 4

Thread: Programming Puzzle 13 - Paycheck Amount?

  1. #1
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,299

    Default Programming Puzzle 13 - Paycheck Amount?

    Mr. Karbunkle went to the bank to cash his weekly paycheck. In handing over the money, the cashier, by mistake, gave him dollars for cents and cents for dollars.

    He pocketed the money without examining it and spent a nickel on candy for his little boy. He then discovered the error and found he possessed exactly twice the amount of the check.

    If he had no money in his pocket before cashing the check, what was the exact amount of the check? One clue: Mr. Karbunkle earns less than $50 a week.

    (Courtesy: Creative Computing Magazine)

    Instructions:

    Write an xbasic script that solves the puzzle and displays the answer in a message box on screen.
    Last edited by Al Buchholz; 06-28-2011 at 10:41 PM. Reason: my 5 cents.

  2. #2
    "Certified" Alphaholic
    Real Name
    Andrew Schone
    Join Date
    Dec 2005
    Location
    Kansas
    Posts
    1,044

    Default Re: Programming Puzzle 13 - Paycheck Amount?

    Hrm.. Sounds like I might want to start banking at Mr. Karbunkle's bank.
    Attached Files Attached Files

  3. #3
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,299

    Default Re: Programming Puzzle 13 - Paycheck Amount?

    I took a different approach using brute force to test all the possible amounts that might have been given to Karbunkle by the cashier.

  4. #4
    Member
    Real Name
    Jeb Richardson
    Join Date
    Aug 2011
    Location
    Bowling Green, KY
    Posts
    26

    Default Re: Programming Puzzle 13 - Paycheck Amount?

    Here is my attempt for puz 13.

    puz 13.txt

Similar Threads

  1. Programming Puzzle 3 - Fractions, anyone?
    By Tom Cone Jr in forum Xbasic Programming Puzzles
    Replies: 7
    Last Post: 11-08-2011, 05:40 AM
  2. Programming Puzzle 11 - More Loops
    By Tom Cone Jr in forum Xbasic Programming Puzzles
    Replies: 11
    Last Post: 08-20-2011, 04:50 PM
  3. Programming Puzzle 10 - Sweets on a budget
    By Tom Cone Jr in forum Xbasic Programming Puzzles
    Replies: 8
    Last Post: 08-15-2011, 10:59 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •