Professional Documents
Culture Documents
Enter The Name of The Pharmacy: Mahmoud Welcome To Mahmoud's Pharmacy Is The User A (Store - Pharmacy - Patient) ?
Enter The Name of The Pharmacy: Mahmoud Welcome To Mahmoud's Pharmacy Is The User A (Store - Pharmacy - Patient) ?
Enter The Name of The Pharmacy: Mahmoud Welcome To Mahmoud's Pharmacy Is The User A (Store - Pharmacy - Patient) ?
1- Storage Facility.
2- The Pharmacy itself.
3- Customers (Patients).
Store:
• Storing different medicines (by their names).
• Unlimited Quantity.
Output:
Report with: Names of medications.
The times that a medicine had been ordered from the store.
Asking whether there is a new medicine to order from outside.
Screen 1:
Pharmacy:
Screen 2:
Total Price:
Is the user a [store – pharmacy – patient]?
Patient:
Screen 3:
Name of medicine:
How old are you: 33
Are you (Pregnant – Smoker – have heart issues..): pregnant
Warning: This medicine will affect you and your child badly, Let me give you some
alternatives with less serious side effects.
Alternative List for a pregnant woman:
Name : Side effects: Price:
(sure/remove)? Sure
How do you want to buy (cash / credit card): cash
You will pay: dollar.
This is your bill:
I also would like you to write a C program that performs the following:
Creates one 2D array of size 5X2, named Temperature.
Fill the first column with random values in the range [20, 50].
Ask the user to fill the second column with values in the range [0, 20], if he/she
enters less than 0 or more than 20, a message must be displayed for the user to
try again.
The program should display a menu for the user to choose among 7 options as
demonstrated in the example below.
Note that each option from 1 till 5 will call a different function as follows:
o Find maximum: will call a function named Maximum that prints the max
values for each column and as a whole. Maximum takes the 2D array as
an input.
o Find minimum: will call a function named Minimum that prints the min
values for each column and as a whole. Minimum takes the 2D array as
an input.
o Find average: will call a function named Average that prints the average
values for each column and as a whole. Average takes the 2D array as an
input
o Search value: asks the user to input a value to search for and then call a
function named Search that returns the column index if the value is found
otherwise it returns -1 if the value is not found. Search takes 2
parameters: 2D array and the value to search for.
o Merge and Convert to 1D array: calls a function named merge that takes
2 parameters: 1D array and 2D array. This function converts the 2D array
to 1D array. And the main prints the results after merging.
Example:
I have created 2D array of size 5X2, and I fill the
first column randomly with values in the range [20,
50]:
50
24
31
49
20
Please fill the second column with values in the range
[0, 20]:
1st value: -1
Value 1: 0
Value 2: 23
Value 2: 20
Value 3: 16
Value 4: 16
Value 5: 0
Thank you :)
50 24 31 49 20 0 20 16 16 0
Invalid Option
Goodbye :)