Write a program for a pharmacy to generate bills. The program should ask about the code associated with the medicine and then inquire the number of tablets required. Then program should repeat this process until user enter the termination code. After that program should print the details containing the medicine name, number of tablet, price per tablet, total price for the medicine and at the last sum the total bill. List of medicine and there prices are following. Code Medicine Price / Tablet Code Medicine Price 1. Panadol 5.5 Ponstron Bruphine Folic Acid Calpol X 10.7 Fledgel Loprine Rigix Delacine C 2 8.5 7 5.9 20 21.6 3.1 19.8 25.9 10 Denizen DS 37 Your program should show output similar to the following CAUsersVamila Habib\Documents\C++ Files\Q6.exe codes Hedicine codes Panadol Fledgel Loprine Rigix De lacine C 5 E.T露, Medicine Ponstron Bruphine Folic Acid Calpol X Denizen DS 6 3 4 8 9 10 Enter the code of nedicine(-1 to quit) Enter the nunber of tablets Enter the code of nedicine(-1 to quit) Enter the number of tablets Enter the code of nedicine(-1 to quit) Enter the nunber of tablets Enter the code of nedicine(-1 to quit) Enter the number of tablets Enter the code of nedicine(-1 to quit> 1 13 31 3 ? 9 17 -1 Bill # Medicine Tablets Price (per tablet> 5.5 5.9 20.0 19.8 Total Bill Total price 1 Panadol 2 Bruphine 3 Loprine 9 Calpol X 13 31 71.5 182.9 140.0 336.6 731.0 17 Process exited after 0.05538 seconds with return value 8 Press any key to continue
Write a program for a pharmacy to generate bills. The program should ask about the code associated with the medicine and then inquire the number of tablets required. Then program should repeat this process until user enter the termination code. After that program should print the details containing the medicine name, number of tablet, price per tablet, total price for the medicine and at the last sum the total bill. List of medicine and there prices are following. Code Medicine Price / Tablet Code Medicine Price 1. Panadol 5.5 Ponstron Bruphine Folic Acid Calpol X 10.7 Fledgel Loprine Rigix Delacine C 2 8.5 7 5.9 20 21.6 3.1 19.8 25.9 10 Denizen DS 37 Your program should show output similar to the following CAUsersVamila Habib\Documents\C++ Files\Q6.exe codes Hedicine codes Panadol Fledgel Loprine Rigix De lacine C 5 E.T露, Medicine Ponstron Bruphine Folic Acid Calpol X Denizen DS 6 3 4 8 9 10 Enter the code of nedicine(-1 to quit) Enter the nunber of tablets Enter the code of nedicine(-1 to quit) Enter the number of tablets Enter the code of nedicine(-1 to quit) Enter the nunber of tablets Enter the code of nedicine(-1 to quit) Enter the number of tablets Enter the code of nedicine(-1 to quit> 1 13 31 3 ? 9 17 -1 Bill # Medicine Tablets Price (per tablet> 5.5 5.9 20.0 19.8 Total Bill Total price 1 Panadol 2 Bruphine 3 Loprine 9 Calpol X 13 31 71.5 182.9 140.0 336.6 731.0 17 Process exited after 0.05538 seconds with return value 8 Press any key to continue
Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 7RQ
Related questions
Question
100%
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage