Page 56 - My Own Workbook for CSEC Information Technology Examinations
P. 56
Program Implementation SECTION 8 COMPUTATION INVOLVING ORDER OF PRECEDENCE
28. A electricity provider generates customer bills using the formula electricity charges = (units consumed x fuel charge) + customer charge. The fuel charge is fixed at $12.50 per unit whereas the customer charge is $100.
(a) Develop an algorithm which prompts for and accepts the customer’s previous meter reading and customer’s current meter reading. The algorithm should compute the units of electricity consumed and the electricity charges. The algorithm should output the literal “Please pay this
amount =>” followed by the amount to pay.
(b) Implement the program using a programming language of your choice.
................................................................................................................................................................................................................. ................................................................................................................................................................................................................. ................................................................................................................................................................................................................. ................................................................................................................................................................................................................. ................................................................................................................................................................................................................. ................................................................................................................................................................................................................. ................................................................................................................................................................................................................. ................................................................................................................................................................................................................. ................................................................................................................................................................................................................. ................................................................................................................................................................................................................. ................................................................................................................................................................................................................. ................................................................................................................................................................................................................. ................................................................................................................................................................................................................. ................................................................................................................................................................................................................. ................................................................................................................................................................................................................. ................................................................................................................................................................................................................. .................................................................................................................................................................................................................
Copyrighted material. All rights reserved.
98
IT-book-edited-8,3x11,7.indd 101 9/11/18 7:25 PM
DO NOT COPY THIS PAGE DO NOT COPY THIS PAGE DO NOT COPY THIS PAGE