+ 1
Im trying to solve the loan calculator olz help but dont give the answer
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int amount= sc.nextInt(); int ten = 10 ; int combine = amount/10 ; for(int x=amount;x<=20000;x=x*3) { System.out.println(combine); } for(int x=amount;x<=20000;x=x*3) { System.out.println(combine); } for(int x=amount;x<=20000;x=x*3) { System.out.println(combine); } } }
3 Answers
+ 2
This is one of the coach tasks, and many had attempted to solve it. I suggest you to search the forum to get clues (perhaps even solution) đ
+ 2
You need to reduce the amount by each payment and then calculate the next payment reduction using the reduced loan balance
0
Each time you get 10% of loan you have to subtract that from the amount then you will get your correct answer