0
Could someone explain the methodology for Java lesson 20?
I've been hitting my head against this wall for a bit now, but just don't understand the methodology. You have an amount You need to subtract 10% of that amount from that amount 3 times. Then you need to output what is left of the amount. I just have no idea how to get what's left as an output, and would appreciate help.
1 ответ
+ 3
If you have an amount of 5000:
10% of 5.000 = 500
5000 - 500 = 4500
10% of 4500 = 450
4500 - 450 = 4050
10% of 4050 = 405
4050 - 405 = 3645
left -> 3645
What is 10% from n? It is the same as n * 0.1
Hope this helps.