The basics of programming in c++ for beginners

A task: two-tariff electricity meter

A task: write a program to calculate the cost of electricity on the testimony of two-tariff electricity meter. There is a two-tariff electricity meter. Readings are taken at the end of the month. Data for calculating – the difference between the readings of the previous month and the current (day and night tariff.) Initial data:

  • daily rate (with 7-00 am to 23-00);
  • night charge (with 23-00 to 7-00 morning );
  • The first tariff zone – to 100 kWh time: 0.456 UAH
  • The second tariff zone – from 100 to 600 kWh time: 0.789 UAH
  • A third tariff zone – over 600 kWh time: 1.479 UAH
  • night charge – 50% of the value of each daily tariff zone

Leave a Reply

Your email address will not be published. Required fields are marked *