Use the code you already have and create at least 2 functions to use. For this assignment the functions must meet the following conditions:

  • Each function must use at least 1 parameter
  • At least 1 of the functions must return a value back to the main function.
  • Choose the parts of code that you think would work best in a function, use comments to explain WHY those are the parts that you think would work best in a function.

Create a C++ program that will do the following:

  • Ask the user how many months worth of data they want to enter (up to 12).
  • Ask the user who their TDU is.
  • Take the kwh used for each month from the user.
  • Calculate the charges for each month based on the rates specified in the EFL.
  • Calculate the TDU charges based on the kWh the user entered and the TDU they selected.
  • Display the charges for each month (show the electric company charges, the TDU charges, and the total charges of both combined).
  • Display the total charges for all months added together (show electric company charges, TDU charges, and total charges of both combined).

TDU Delivery Charges: see image.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.