ladijock
Dec 14, 2009, 03:11 PM
How about this one.. can anyone help?
How about this one?
You agree to work for a certain employer, but ask to be paid in a peculiar way. After the first day you are paid one penny. On each sucsessive day your pay is doubled. Write a program that determines your pay after 30 days. Your program should display your pay for each day of the 30 day period and the total pay earned after each day.
Sample Display:
Day Daily Pay Total Pay
1 0.01 0.01
2 0.02 0.03
3 0.04 0.07
How about this one?
You agree to work for a certain employer, but ask to be paid in a peculiar way. After the first day you are paid one penny. On each sucsessive day your pay is doubled. Write a program that determines your pay after 30 days. Your program should display your pay for each day of the 30 day period and the total pay earned after each day.
Sample Display:
Day Daily Pay Total Pay
1 0.01 0.01
2 0.02 0.03
3 0.04 0.07