Write a complete C program that will calculate and print bills for the city power company. The rates vary depending on whether the use is residential, commercial, or industrial. A code of R means residential use, a code of C means commercial use, and a code of I means industrial use. Any other code should be treated as an error.
The rates are computed as follows:
R: $6.00 plus $0.052 per kwh used
C: $60.00 for the first 1000 kwh and $0.045 for each additional kwh
I: Rate varies depending on time of usage:
Peak Hours: $76.00 for first 1000 kwh and $0.065 for each additional kwh
Off-peak Hours: $40.00 for first 1000 kwh and $0.028 for each additional kwh.
Your program should prompt the user to enter an integer account number, the use code (type char), and the necessary computation figures in whole numbers of kilowatt-hours (kwh). Your program should display the amount due from the user.
The rates are computed as follows:
R: $6.00 plus $0.052 per kwh used
C: $60.00 for the first 1000 kwh and $0.045 for each additional kwh
I: Rate varies depending on time of usage:
Peak Hours: $76.00 for first 1000 kwh and $0.065 for each additional kwh
Off-peak Hours: $40.00 for first 1000 kwh and $0.028 for each additional kwh.
Your program should prompt the user to enter an integer account number, the use code (type char), and the necessary computation figures in whole numbers of kilowatt-hours (kwh). Your program should display the amount due from the user.