Bookie bookie book club


Cthulhu is helping his goaty friends form bookie bookie book clubs. Each club has a name (like Bonnie's Ear Burns), and can order three different titles. Cthulhu will cover most of the cost.

You can download a start workbook.

Here's what the order form looks like to start.


The goats enter a name for their club. The name is required. If there is no name, report an error. If the name is just spaces (some goats will try to trick your program), that counts as no name. Show an error message, and end the program.


The goats enter the number of each title they want. The values must be numbers. Here's an error message:

Another error

The numbers can't be negative:

Yet another error

If all the data is OK, complete the computations, like this:


Moby Dicks cost $12.95 each. Eats are $14.95. Fights are $11.95.

If the book cost is less than $50, shipping is 20% of the book cost. If the order is between $50 and $100, then shipping is 10%. Shipping for orders $100 or more is free.

Legal fees are 18% of book costs. There's an ongoing copyright infringement case over the bookie bookie book theme song.

Total cost is books plus shipping plus legal.

The goats pay $8. Cthulhu pays the rest.

Upload your solution. The usual standards apply.

Where referenced