Design a c++ program that calculates the amount of money aperson would earn over a period of time if his salary is one pennythe first day, two pennies second day, and continues to double eachday. The program should ask the user for the number of days.Display a table showing what the salary was for each day, and thenshow total pay at the end of the period. the output should bedisplayed in a dollar amount, not the number of pennies. Theprogram must include at least one function in addition to the mainfunction and must use the loop as well.