Help please to solve this Java exercise I tried a lot but I'm stuck | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Help please to solve this Java exercise I tried a lot but I'm stuck

https://code.sololearn.com/cvjNnlv9p48N/?ref=app You have saved up an amount of money, €500. Being a kind person, you like to help your friends by giving them small loans. Your friends have asked if they can borrow the following amounts from you. 60,20,100,80,40,300,200,100. Loans will be granted on a first come, first served basis. Write a Java program, which processes these loan request amounts. If there is enough money remaining in the kitty, the full amount of the loan request should be granted. If, however, the amount of the loan request exceeds the amount of money remaining: • Whatever amount of money is left in the kitty should be given out. For example, if the balance remaining is €200 and the loan request is for €300, the balance remaining of €200 should be given out. Any outstanding loan request amounts should then be displayed in the console.

14th May 2021, 6:19 AM
Sylvi
Sylvi - avatar
2 Answers
14th May 2021, 1:01 PM
Ciro Pellegrino
Ciro Pellegrino - avatar
0
Thanks a million Ciro Pellegrino you saved my life 😊
14th May 2021, 6:21 PM
Sylvi
Sylvi - avatar