code in c++
Extracted text: Write a C+ program that helps the electricity company to manage users’ electricity information. You need to define 5 1D arrays to save users' info, as follows: CurrentReading PreviousReading ElectricityTotal(AED) MeterNo kWh 64560 | 665 15677 | 234 32675 567 123 345 To be calculated 124 123 To be calculated 125 298 To be calculated where int MeterNo[3] represents the meter number. double KillowattHours[3] represents the meter reading in kWh. double ÇurrentReading[3] represents the current meter reading. double PrevieusBeading[3] represents the previous meter reading. double ElectricityTotal[3] represents the total meter reading. Write a function read that reads the electricity information (Meter No, KillowattHours, Current Reading, and Previous Reading) from the user input and stores them in the different arrays. Update your main function to call the function read. a. Function prototype: void read(int meterNo[], double killowattHours[], double currentReading[], double previousReading, int size) b. Write a function totals that calculates the total price in AED per meter and saves them into the ElectricityTotal array, where Customer pay 8.29 fils per kWh. You may use this equation to calculate the total: Total = (currentReading-previousReading)* (fils per kWh) Update the main function to call the function totals. Function prototype: void totals(double currentReading[], double previousReading[], double ElectricityTotal[], int size) c. Write a function sort that sorts users' information in descending order based on the total value, as follows: (No need to print the info on the screen)
Extracted text: Write a C+ program that helps the electricity company to manage users’ electricity information. You need to define 5 1D arrays to save users' info, as follows: CurrentReading PreviousReading ElectricityTotal(AED) MeterNo kWh 64560 | 665 15677 | 234 32675 567 123 345 To be calculated 124 123 To be calculated 125 298 To be calculated where int MeterNo[3] represents the meter number. double KillowattHours[3] represents the meter reading in kWh. double ÇurrentReading[3] represents the current meter reading. double PrevieusBeading[3] represents the previous meter reading. double ElectricityTotal[3] represents the total meter reading. Write a function read that reads the electricity information (Meter No, KillowattHours, Current Reading, and Previous Reading) from the user input and stores them in the different arrays. Update your main function to call the function read. a. Function prototype: void read(int meterNo[], double killowattHours[], double currentReading[], double previousReading, int size) b. Write a function totals that calculates the total price in AED per meter and saves them into the ElectricityTotal array, where Customer pay 8.29 fils per kWh. You may use this equation to calculate the total: Total = (currentReading-previousReading)* (fils per kWh) Update the main function to call the function totals. Function prototype: void totals(double currentReading[], double previousReading[], double ElectricityTotal[], int size) c. Write a function sort that sorts users' information in descending order based on the total value, as follows: (No need to print the info on the screen)