You just received a programming job offer from a local


You just received a programming job offer from a local startup company. It is a guaranteed one year position (52 weeks) but it has a peculiar wage offer. For the first week, you will be paid one cent. For week 2, you will be paid 2 cents; 4 cents for week 3; 8 cents for week 4 – and the pay keeps doubling every week until the end of the contract. So at the end of week one, you will have been paid 1 cent; at the end of week two, 3 cents (2 + 1 cents); at the end of week three, the total will be 7 cents (4 + 3 + 1) and so on. Write a program that implements two recursive methods: one that given the week number, it will report the amount to be paid for that week (i.e. week 10 pays $10.24); and second method that reports the total amount paid to date given the week number (i.e. by the end of week 8, $5.11 has been paid in total) . The method should repeatedly ask the user to provide the number of weeks and report the results of the two recursive methods. If the user enters 0 weeks, the program will terminate.

Request for Solution File

Ask an Expert for Answer!!
Other Subject: You just received a programming job offer from a local
Reference No:- TGS0610112

Expected delivery within 24 Hours