Loan calculator | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Loan calculator

import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int amount = scanner.nextInt(); //your code goes here int month = 1; int rem_amt = amount ; while (month <= 6){ int payment = (int)Math.ceil(10/100.0*rem_amt); rem_amt -= payment; month++; } System.out.println (rem_amt ); } }

6th Jan 2021, 6:17 AM
Sanket Ranpise
2 Answers
+ 6
Hey there! Please don't post the solution in q/a. Only use this section if you have any programming related queries or facing any issues regarding Sololearn. SL guidelines.. https://www.sololearn.com/discuss/1316935/?ref=app
6th Jan 2021, 6:42 AM
Minho
Minho - avatar
0
https://code.sololearn.com/c1O1gp0kXbYd/?ref=app
8th Mar 2021, 9:46 PM
AKHY EL MAHEDI
AKHY EL MAHEDI - avatar