Question
C Language: The goal is to create a drug dispensing program that has 4 drugs and allows a user to check quantities, refill, and dispense.
C Language:
The goal is to create a drug dispensing program that has 4 drugs and allows a user to check quantities, refill, and dispense. A user must first login with the following credentials before the menu becomes available
Username: Admin01
Password: L3tM3in
The 4 drugs and their initial quantities are
Tylenol 40
Advil 40
Ibuprofen 30
Codeine 10
If either username or password are incorrect, console will clear, and the program will stay at the log in screen.
If credentials are correct and user presses enter, console will clear, and a menu will be displayed.
If option 1 is selected, the console is cleared, and the current quantity of each drug is displayed. A user presses b to go back to menu.
If option 2 is selected, the console is cleared, and a prompt asks a user to select a drug and then enter a quantity to refill with. The program updates quantity and goes back to the main menu
Need to select option 1 from main menu to see if results are updated
From the menu, if option 3 is selected, the program will prompt the user to select a drug and how much to dispense.
When the user presses enter, the program goes back to the main menu. Option 1 must be selected to verify result of dispense.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started