PROBLEM: Write a program that prompts the user to input the amount of money that an ATM machine will dispense and then show the breakdown of how many 1000, 500, and 100 peso bill/s are dispensed. The program must display the amount then prompt the user if the transaction will continue or not by choosing between Y (for Yes) and N (for No). If an invalid character is entered, it must display that the user entered an invalid character. The program must also display that the maximum allowable amount is 10,000 and the minimum allowable amount is 100. If the entered amount is greater than 10,000 or less than 100, an error notification must be displayed. Moreover, the entered amount must be exactly divisible by 100. TEST CASES: If a user inputs an amount less than or equal to 10,000: REMINDER: Maximum amount must only be 10,000 and the minimum amount must not be less than 100 Enter Amount to dispense: 4900 The Amount of money you entered is 4900. Do you want to continue your transaction? Enter Y for 'Yes' and N for 'no': Y Breakdown of dispensed peso bill: The number of dispensed 1000-peso bills is 4 The number of dispensed 500-peso bills is 1 The number of dispensed 100-peso bills is 4 If a user inputs an amount less than or equal to 10,000: REMINDER: Maximum amount must only be 10,000 and the minimum amount must not be less than 100 Enter Amount to dispense: 7400 The Amount of money you entered is 7400. Do you want to continue your transaction? Enter Y for 'Yes' and N for 'no': Y Breakdown of dispensed peso bill: The number of dispensed 1000-peso bills is 7 The number of dispensed 500-peso bills is 0 The number of dispensed 100-peso bills is 4
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
PROBLEM:
Write a program that prompts the user to input the amount of money that an ATM machine will dispense and then show the breakdown of how many 1000, 500, and 100 peso bill/s are dispensed. The program must display the amount then prompt the user if the transaction will continue or not by choosing between Y (for Yes) and N (for No). If an invalid character is entered, it must display that the user entered an invalid character. The program must also display that the maximum allowable amount is 10,000 and the minimum allowable amount is 100. If the entered amount is greater than 10,000 or less than 100, an error notification must be displayed. Moreover, the entered amount must be exactly divisible by 100.
TEST CASES:
If a user inputs an amount less than or equal to 10,000:
REMINDER: Maximum amount must only be 10,000 and the minimum amount must not be less than 100
Enter Amount to dispense: 4900
The Amount of money you entered is 4900.
Do you want to continue your transaction?
Enter Y for 'Yes' and N for 'no': Y
Breakdown of dispensed peso bill:
The number of dispensed 1000-peso bills is 4
The number of dispensed 500-peso bills is 1
The number of dispensed 100-peso bills is 4
If a user inputs an amount less than or equal to 10,000:
REMINDER: Maximum amount must only be 10,000 and the minimum amount must not be less than 100
Enter Amount to dispense: 7400
The Amount of money you entered is 7400.
Do you want to continue your transaction?
Enter Y for 'Yes' and N for 'no': Y
Breakdown of dispensed peso bill:
The number of dispensed 1000-peso bills is 7
The number of dispensed 500-peso bills is 0
The number of dispensed 100-peso bills is 4
Step by step
Solved in 2 steps with 5 images