Write a program in C to calculate the electricity charges for any number of subscribers that are registered with the utility company that is providing the electricity. The charges are levied quarterly and depend on:
1. The amount of electricity used (in kilo-watt-hours kwh)
2. Whether the user is commercial or private,
3. There is a basic (fixed) processing charge of $50.00 for all users
4. For all private users there is a discount of 0.5% that only applies to any amount that exceeds 1,000 kwh.
5. For all commercial users there is a penalty rate of 1% that applies to all amounts that exceeds 100,000 kwh.
The current charges per kwh are:
1. Private users = 68 cents per kwh, and
2. Commercial users = 74 cents per kwh.
Your program is to:
1. Repeatedly process users until the user wishes to finish
2. Reports the charges for each individual subscriber (user)
3. When no more users are to be processed, summarizes the results as follows
a. Total number of private users processed
b. Total amount ($) received from all private users entered
c. Average amount received per private users
d. Total number of commercial users processed
e. Total amount ($) received from all commercial users entered
f. Average amount received per commercial user