+ 1

Can anyone tell me all test cases in Loan Calculator, please?

30th Dec 2020, 9:04 PM
Thuong Nguyen
Thuong Nguyen - avatar
3 Answers
+ 6
My attempt... Don't know if it works 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 rem_amt = amount; for (int i = 1 ; i <= 6 ; i++) { int paid = (int)Math.ceil(10/100.0*rem_amt); rem_amt -= paid ; } System.out.println(rem_amt); } }
31st Dec 2020, 1:09 AM
VṢtēphen
VṢtēphen - avatar
+ 3
No, but if you share your code and describe your problem we can help to actually solve it. We don't have access to the hidden cases.
30th Dec 2020, 9:25 PM
ChaoticDawg
ChaoticDawg - avatar
0
My problem was solved, thank two of you.
31st Dec 2020, 5:39 AM
Thuong Nguyen
Thuong Nguyen - avatar