3 or 8 – Online Bookstore. Ask for the user's login name (3 to 7) alphabetic or numeric characters starting with an alphabetic character for registered users, or "guest"). A user name of "END" indicates the end of the day. For each customer, repeatedly ask for the book title (“END” to quit), the book format (ebook, paperback, or hardcover) and the number of copies. Your program must be able to handle book titles that include spaces, that is, with multiple words. Ebooks cost 100 baht, paperbacks cost 300 baht, and hardcover books cost 500 baht.
Registered users receive a 5% discount if they buy up to 4 books (of any format) in one order and a 10% discount if they buy 5 or more books in one order. (If they buy 4 copies of one title, or 4 different titles, both are considered to be 4 books.) When a customer is finished entering book titles, print an invoice, showing the user login name, plus a record of each transaction in order: title, format, number of copies, per copy price and extended price (that is, number of copies times per copy price), plus the invoice total before discount, and the
invoice total after discount. At the end of the day print the total number of each book format sold, the number of registered users served,
the number of guests served, and the total amount received.