Question: Write the following C++ program You will be working for a penny a day, but your salary will double every day for 31 days. So,

Write the following C++ program

You will be working for a penny a day, but your salary will double every day for 31 days.

So, day one you make .01, day 2 you make .02, and day 3 you make .04.

Calculate the pay in one loop and store the pay in an array, and then use a 2nd loop to print out the pay. When you print out the pay, don't print out the pay for days 5 and 30. You called in sick those days. (When you calculate the pay, it is still double the pay every day.)

Also print the average daily pay at the end of your report (don't include days 5 and 25 in the average. Include commas and dollar signs!

Include headings above your loop for Day and Pay.

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!