I'm currently working on Node.js back-end application. In a nutshell, it should compute a deposit needed to return to previous average after several days of not making deposits.
Let's say, our average deposit during the first three days was 100. Then we were idle for 4 days, obviously our average would drop significantly. How do we figure out what a single deposit must to be to return to the previous average of 100?
Help will be greatly appreciated.