السلام عليكم ورحمة الله وبركاته ...
لو سمحتوا اختي عندها اسايمنت وتبا منكم المساعده في حله .. اللي عندهم خبره ب السي ++ او اللي يدرسون علوم كمبيوتر او نظم معلومات ... وهي مستعيله عليه وتباه باجر لو ما عليكم امر ...
لو سمحتوا اختي عندها اسايمنت وتبا منكم المساعده في حله .. اللي عندهم خبره ب السي ++ او اللي يدرسون علوم كمبيوتر او نظم معلومات ... وهي مستعيله عليه وتباه باجر لو ما عليكم امر ...
Write a C++ program that will be used in a grocery store. The program reads a whole change amount in dirham and prints how many 500 dirham bills, 200 dirham bills, 100dirham bills, 50dirham bills, 20dirham bills, 10dirham bills, 5dirham bills, and 1 dirham coins should the cashier return to the customer.
For example, if the cashier enters 2789 dirhams, the program should print :
Amount entered: 2789 dirhams
5 - 500 dirham bills
1 - 200 dirham bills
1 - 50 dirham bills
1 - 20 dirham bills
1 - 10 dirham bills
1 - 5 dirham bills
4 - 1 dirham coins
The program should read positive values and calculate the change for each one.
Stop the program when you enter a 0 or a negative value.
Your program should use at least one function. One array, one for loop, and one sentinel-controlled while loop.
For example, if the cashier enters 2789 dirhams, the program should print :
Amount entered: 2789 dirhams
5 - 500 dirham bills
1 - 200 dirham bills
1 - 50 dirham bills
1 - 20 dirham bills
1 - 10 dirham bills
1 - 5 dirham bills
4 - 1 dirham coins
The program should read positive values and calculate the change for each one.
Stop the program when you enter a 0 or a negative value.
Your program should use at least one function. One array, one for loop, and one sentinel-controlled while loop.