1 Answer - Sort by: Date | Rating
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.
0
0
Guest
answered 8 months ago
- What Is Polymorphism ? With Example
- How To Pull A Command Prompt?
- Where Can I Find Pdf Files Of The Old White Wolf Rpg Books?
- Write A Program To Accept Two Matrices And Perform Addition And Multiplication Operation On The Two Matrices?
- Task1.1 : Write A Program To Accept 10 Numbers And Then Prints Them In Reverse Order. Question : Modify Task 1.1, So That The Program Will Also Print The Total Sum Of All The Numbers Entered By The User?
- Write A Program To Accept 10 Numbers And Then Prints Them In Reverse Order?
- How To Create A Header File In C Language?
- What Is Difference Between HTML Vs XHTML?
- How The Efficiency And Integrity Of The Data Is Maintained At All?
- A Form In Visual Basic Is Best Described As What?
- How To Update The Sim 3 Expansion?
- Program To Calculate Change The Name To Write In Any Word In English And It Will Convert To Change Any Language Of User?
- What Are The Risks In Undertaking A Systems Analysis And Design Activity?
- Do While Loop In C++ Output?
- What Is File-based Approach?
- What Is Cascading Rollback?
- How Do I Create An SQL Queries That Show: Student Name, Address, And Contact Information For All Students? Student Name And The Certificate Program For Which They Are Registered Student Name And The Courses For Which They Are Registered?
- I Need To Create A System Where Students Can Register For One Of 5 Certificates, Select Courses, And Obtain A Transcript Of The Grades Received For The Courses. Each Student Can Be Enrolled For Only One Certificate. There Are 4 Courses In Each Cert?
- How The Efficiency And Integrity Of The Data Is Maintained At All Times Although The Database Is Used By Varying Organisational Levels? 2 Examples
- What Is An Attribute In Java?
- How About Links Of London?
- When You Create A New COM Component In Visual Basic, You Choose The Following Template?
- What Parts Of Wordpad?
- What Is Indexed File Organization?

New Comment - Comments are editable for 5 min.