Help with output program calculation ( Programming C++)
For the first test output, I don't know how to get electricity charges of 154.52
but, how do I get 154.52?
500 * 154.52/500
154.52/500 is the cost per kwh
Oh nvm I didn't read ur 2nd attachment they tell u how to find cost per kwh
Yea, I know that. The numbers are there for me to check my program calculations. I just don't know what calculations I have to do in order to get 154.52
The 2nd attachment tells u
Yea, I multiply 500 to each one, but my numbers aren't correct.
Not like that
So the base line is 75 let's say
U pay a different cost for kwh used more than 75.. then more than 130% of that
And then another for 200% over base line
500 is clearly over 200%of baseline of 75
Okay so u'll pay For the lowest price for the first 75 kwh then 2nd lowest from 76 to 1.30*75 % then 3rd lowest for 1.30*75+1 to 150.. then 151 to500 the highest price
So do cases here. First determine which region your value is in by doing K=Usage /baseline value If k < =1 .... Elseif k <=1.3 .. Elseif k <=2 .. Elsif k>2 ..
Do u get it
So, I would have to do the full program before getting the value of 154.52 for electricity charges?
U know how the cost is calculated right
The cost of 154.52? No ... it is still not ringing to me. Could you show it?
I'll give u aneed example Say u pay 0.25 for understanding and equal to 75 kwh Then 0.3 for eveything above 75 to 100 So for 100 You pay 0.25*75 +0.3*(100-75)
I'm on my phone I can't check the prices and all those values you have to post it here
That should say under* and equal 75
U there
Yea, I am sitting here looking at the instructions
while reading your messages*
Okay tell me the 4 costs and the base line value post it here
Per kwh
No ur instructions
The 4 costs for under baseline. 130 percent 200 and then over
$ 0.18151 for each KWH over 0 and less than or equal to BASELINE (const with the value 76.5) $ 0.21546 for eah KWH over BASELINE and less than or equal to 130% of BASELINE. $ 0.27389 for each KWH over 130% of BASELINE and less than or equal 200% of BASELINE. $ 0.34876 for each KWH over 200% BASELINE
Okay so cost for 500 kwh is 0.18151*76.5+0.21546*(1.3*76.5-76.5)+0.27389*(2*76.5-1.3*76.5)+0.34876*(500-2*76.5)
Yea, I'm figuring out what you did with your equation
Ur paying a different amount for each division Think about the number line
Your equation is starting to make sense, could you draw a number line for me? My head is like a nut at the moment.
0------75-----97.5-----150-------------500 C1 c2 c3 c4 C1 means cost 1 which is 0.18151
I am gonna do the 2nd output to check my understanding.
Did u figure out the kwh consumed parr
it is 500 / 154.52 like you said?
are you talking about the first one or the 2nd?
2 cases Current meter reading > previous meter reading Current meter reading < previous meter reading
Yea, I know how to do the programming side. I'm still clueless on how to find the electricity charges before creating the program. I understand your equation on how to get 154.52
That stuff that says adjusting max Meterm stuff for rolling over
Okay now code the eqn
Okay, I'll try to manage myself from here on. I don't want to hold you here for anymore longer.
Ok I'm going to sleep then cya
THank you for your patience and helping, including your time :)
Ok before I go so u'll u've ur 4 cases in Let k be the number of kwh consumed If k <=1 .. Elseif k <=1.3 .. Elseif k <=2*76.5 0.18151*76.5+0.21546*(1.3*76.5-76.5)+0.27389*(k*76.5-1.3*76.5) ElseIf k > 2*76.5 0.18151*76.5+0.21546*(1.3*76.5-76.5)+0.27389*(2*76.5-1.3*76.5)+0.34876*(k-2*76.5)
The first 2 cases shud say 1*76.5 And 1.3*76.5
Depending on whice division u are in u can eliminate parts from the equation
case 1: Else if k <= 76.5 0.18151 * k
Join our real-time social learning platform and learn together with your friends!