+ 1

Java Loan Calculator problem

Please why do I receive a "not found symbol error" when printing out variable r in the Java Loan Calculator problem? https://code.sololearn.com/c53RV5hpD363/?ref=app

22nd Dec 2020, 5:24 AM
BRYAND CHE
BRYAND CHE - avatar
10 Réponses
+ 6
BRYAND CHE You need to look course and problem again. Try to understand first. You are not clear what you have to do.
22nd Dec 2020, 6:22 AM
A͢J
A͢J - avatar
+ 5
BRYAND CHE There are 2 type of variable local and global. If you declare locally and accessing globally then you can't access.
22nd Dec 2020, 5:57 AM
A͢J
A͢J - avatar
+ 3
Because variable" r" is declared inside the for loop and you are outputting value of " r" after the loop ends .Also you are using "r" without initializing it .
22nd Dec 2020, 5:40 AM
Alphin K Sajan
Alphin K Sajan - avatar
+ 2
Use 90% for 6 months to find the balance. 4 lines of code added. https://code.sololearn.com/cp6GXE4Rc84v/?ref=app If you are paying 10% every month, one way is to find the 10% and then use your total minus the 10% paid to get the balance. The other way, is to find the 90% so you don't have to minus. If you have 100 and you paid 10%, Method 1: 100 - (100 * 10%) = 90 Method 2: 100 * 90% = 90 The "i=0" is used for looping. It will loop from 0 until 5 (< 6), which is 6 times. Finally prints out amount.
29th Dec 2020, 6:31 PM
Lam Wei Li
Lam Wei Li - avatar
0
Please I Am Groot ! can you correct and send here
22nd Dec 2020, 6:10 AM
BRYAND CHE
BRYAND CHE - avatar
0
Alphin K Sajan please if it's possible can you correct the code
22nd Dec 2020, 6:23 AM
BRYAND CHE
BRYAND CHE - avatar
0
I Am Groot ! Okay thanks
22nd Dec 2020, 6:25 AM
BRYAND CHE
BRYAND CHE - avatar
0
Thanks Lam Wei Li
30th Dec 2020, 9:44 AM
BRYAND CHE
BRYAND CHE - avatar
0
Thanks everyone
30th Dec 2020, 9:44 AM
BRYAND CHE
BRYAND CHE - avatar
0
i see the same problem
28th Jan 2021, 10:02 PM
Itz.ME
Itz.ME - avatar