Chemistry, asked by abhaykr0077, 5 hours ago

write aprogram in c++ An employee working at a very bizzare company, earns one penny on their first day. However, for every day that passes, their base amount doubles, so they earn two pennies on the second day and four pennies on the third day (totalling 7 pennies). Given a number of days, return how many pennies the employee accumulates. Implement the program using classes

Answers

Answered by rajputprincy99
0

Explanation:

The for loop needs some work.

Given your example:

doubledPay(1) ➞ 1 1 * 1 Total of 1

doubledPay(2) ➞ 2 1 * 2 + 1 Total of 3

doubledPay(3) ➞ 4 2 * 2 + 3 Total of 7

double Pay(4) ➞ 8 2 * 4 + 7 Total of 15

Attachments:
Similar questions