Question: Write your code in Q30) that calculates how much money you will have after each day of spending (or saving). The user inputs the starting

 Write your code in Q30) that calculates how much money you

Write your code in Q30) that calculates how much money you will have after each day of spending (or saving). The user inputs the starting (or target) amount of money (integer data type). Then In each day, the amount of money you spend (or save) is the same as the day number. The program lists out the spending (or saving) progress from day 0 until using up all the money (or reaching the saving target). 5th digit of Student ID Input $ Odd Original amount Even Saving target Calculate Spending Saving Sample display (for odd) Starting money: $6 Day 0 you spend $0 so you have $6 Day 1 you spend $1 so you have $5 Day 2 you spend $2 so you have $3 Day 3 you spend $3 so you have $0 Sample display (for even) Target money: $6 Day 0 you save $0 so you have $0 Day 1 you save $1 so you have $1 Day 2 you save $2 so you have $3 Day 3 you save $3 so you have $6 Sample display (for odd) Starting money: $20 Day 0 you spend $0 so you have $20 Day 1 you spend $1 so you have $19 Day 2 you spend $2 so you have $17 Day 3 you spend $3 so you have $14 Day 4 you spend $4 so you have $10 Day 5 you spend $5 so you have $5 Day 6 you spend $6 so you have $-1 Sample display (for even) Target money: $20 Day 0 you save $0 so you have $0 Day 1 you save $1 so you have $1 Day 2 you save $2 so you have $3 Day 3 you save $3 so you have $6 Day 4 you save $4 so you have $10 Day 5 you save $5 so you have $15 Day 6 you save $6 so you have $21

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!