Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions