-2
Hello colleagues of profession, I am creating a component in Angular(5+) in which I need an algorithm to perform this calculation of energy consumption
In case the power option is selected
I inform the:
potency
Use (h/day)
Rate (R$/kWh)
That I should return something like:
opções escolhidas:
potencia 0.01 kW
tarifa 0.77 R$/kWh
utilização 8 horas por dia
resultados:
diário R$ 0.06
mensal R$ 1.85
anual R$ 22.48
decênio R$ 224.84
In the case of voltage and current: I inform:
- Voltage (V)
- Current (A)
- Use (h/day)
- Rate (R$/kWh)
That I should return something like:
Opções escolhidas:
potencia 0.05 kW
tarifa 0.77 R$/kWh
utilização 8 horas por dia
Resultados:
Gasto por período
diário R$ 0.31
mensal R$ 9.24
anual R$ 112.42
decênio R$ 1,124.20
You can post what you tried?
– Eduardo Vargas
Hi buddy, I’ll post it right here
– Philip Developer
@Eduardovargas posted just below the code I used to solve the problem.
– Philip Developer