Challenge #1

Pricing Problem
‘Ken’s book shop’ has a rather complicated pricing structure.

Write a program which takes inputs from the salesperson, and calculates the price of each book and displays the total bill. Carefully break it down into subtasks and write functions to achieve these subtasks.

The pricing policy per book is;

Price = surface area of book in square centimeters * weight of the book in pounds * 10 Baht + the square root of the number of pages – Discount.
Discount = 2Baht per day it has been in stock over 10 days, and 5 Baht per day it has been in stock over 20 days
One additional problem is that, the salesperson only has a ruler which measures in inches, and a set of scales in grams!

A customer may purchase any number of books. If the customer is a member of the book store, and they purchase 3 or more books, they will receive a further 20% discount on the cheapest book.

Your output should display the total bill.