Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Convert the following pseudocode algorithm into a complete C++ program using a C++ compiler of your choice. When the program is completed, copy and paste
Convert the following pseudocode algorithm into a complete C++ program using a C++ compiler of your choice. When the program is completed, copy and paste the code into your word document and paste a screenshot of the output window below your code. Write an algorithm that is given your electric meter readings (in kilowatt-hours) at the beginning and end of each month of the year. The algorithm determines your annual cost of electricity on the basis of a charge of 6 cents per kilowatt-hour or the first 1000 kilowatt-hours of each month and 8 cents per kilowatt-hour beyond 1000. After printing out your total annual charge, the algorithm will determine if you have been energy conscious by displaying an appropriate message if you have used less than 10000 kilowatt-hours for the entire year. Solution: Set annualKwh to zero Set annualChg to zero Set month to 1 Get kwhBegin while month
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started