Question: Credit Card Charge Statistics . 1. Write a program that lets the user enter the total amount of money spent on a credit card for

 Credit Card Charge Statistics . 1. Write a program that letsthe user enter the total amount of money spent on a creditcard for each of 12 months into an array of doubles. Theprogram should have the following functions: A totalAmount function that takes inan array and size of the array as input arguments and returnsthe total of the 12 values in the array An average Amount

Credit Card Charge Statistics . 1. Write a program that lets the user enter the total amount of money spent on a credit card for each of 12 months into an array of doubles. The program should have the following functions: A totalAmount function that takes in an array and size of the array as input arguments and returns the total of the 12 values in the array An average Amount function that takes in an array and size of the array as input arguments and returns the average of the 12 values in the array A largestMonth function that takes in an array and size of the array as input arguments and returns the largest value in the array A smallestMonth function that takes in an array and size of the array as input arguments and returns the smallest values in the array The output should look like the following (given the example input): Here are the credit card totals for each month: January : $9.50 February : $19.50 March : $29.50 April : $39.50 May $0.00 June : $59.50 July : $59.50 August : $100.00 September: $40.75 October : $30.75 November : $20.75 December : $10.75 The total amount of money spent was $420.00 The average amount of money spent per month was $35.00 The most amount of money spent in a month was $100.00 The least amount of money spent in a month was $0.00 NOTES: To print out the month names, consider having an array of strings. For the spacing and the proper number of decimal places, you must use functions from the iomanip library. Formatting must be followed, as we are dealing with money. Input Validation: Do not accept negative numbers for monthly credit card charges. If the credit card charge for the month is negative, assume the value to be 0. Pseudocode For pseudocode, the example code below shows a proper amount of pseudocode: // Edwin Ambrosio // CS 2, Section 0120 // Example Code // This program gets the number of employees, then each // of their number of days missed, and calculates the average // number of days missed by all employees. #include #include using namespace std; int getMissed Days (int); // Function to get // missed days for // each employee // Function to calculate the average # of days CS2-Spring 2021 E. Ambrosio // missed for all employees double calcAverage DaysMissed (int, int); int main() int numEmployees = 0; int totalMissed Days; double averageMissedDays; cout > numEmployees) || numEmployees > numDaysMissed) && numDaysMissed

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!