Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

When deciding about whether or not to install Solar Panels on your house, it becomes useful to project ahead as to how much you can

When deciding about whether or not to install Solar Panels on your house, it becomes useful to project ahead as to how much you can expect Pacific Gas & Electric (PG&E) to raise its electric rates each year. The lifetime of a solar installation is about 30 years, so you will want to know how much youll be saving over the next 30 years. If we Google the PG&E electric rates (A6 schedule) for 2001, we find that the average cost of a KiloWatt Hour (KWHr), then was 9.92 cents per KWHr. If we check for the rate in 2015, we find it is 20.34 cents per KWHr. What we want to find out is, over the intervening 14 years, what is the average rate of increase of the cost of a KWHr, per year? It is easy to project the new years cost per kilowatt (cpk) from the old years rate, we can simply use the formula: newYearCPK = (1 + averageRateOfIncrease) * oldYearCPK; If we use a loop to do this for 14 years, then we can test out guesses as to what the averageRateOfIncrease (roi) should be. We may be a bit off on the first guess, so we can make a correction and then try again. Using another loop, give yourself the option of continuing on with another try, or quitting, once youre satisfied that you are close enough. Write code using while loop that will achieve this. c++ is the language, the desired rate is the 2015 rate = 20.34

Below is a sample input and output that your program should produce.

image text in transcribed

Repeat this procedure until you can determine to 4 digits (that would be 5.2xy%, where you need to determine, by trial and error what the values of x and y are) the Average Rate of Increase per year.

nter Rate of Increase Guess (in %); 4 he current rate would be: 17.18 cents/KWHr he desired rate should be 20.34 cents/KWHIr lould you like to try again (Y oP N): y nter Rate of Increase Guess (in %); 5 he current rate would be: 19.64 cents/KWHr he desired rate should be 20.34 cents/KWHIr lould you like to try again (Y oP N): y Enter Rate of Increase Guess (in %): 5.2 The current rate would be: 20.1? cents/KWHr he desired rate should be: 20.34 cents/KWHIr lould you like to try again (Y or N)

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

Logics For Databases And Information Systems

Authors: Jan Chomicki ,Gunter Saake

1st Edition

1461375827, 978-1461375821

More Books

Students also viewed these Databases questions

Question

What are the objectives of performance appraisal ?

Answered: 1 week ago

Question

State the uses of job description.

Answered: 1 week ago