I'm new to programming, i'm getting the hang of it, but my teacher gives a lot of confusing math problems.
I just can't figure out how to do this for the life of me.
Question:
A guy received $ S as royalty for his book. he invested part of it in bonds paying a % interest annually. The rest he invested in a life insurance policy paying b % interest annually. If the total interest from the investments after 1 year is $R, how much did he invest in bonds? (Enter S, a, b and R, calculate investments and output result)