/
Primavera
/
CreditPaymentService
Обзор
Документация
Войти
/
Primavera
/
CreditPaymentService
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
src/CreditPaymentService.java
11 строк
527 B
Helga NN
Initial commit
28 янв 2026, 21:55
28 янв 2026, 21:55
98c73db
Код
Авторство
О чём код?
public class CreditPaymentService { public int calculate(int creditSumm, int loanTermYears, double annualInterestRate) { int amountMonth; int months = loanTermYears * 12; double mounthlyInterestRate = annualInterestRate / 1200; double coefMounflyRate = Math.pow((1 + mounthlyInterestRate), months); double fullCalcResult = (creditSumm * mounthlyInterestRate * coefMounflyRate) / (coefMounflyRate - 1); amountMonth = (int) (fullCalcResult); return amountMonth; } }