Java tutorial
//package com.java2s; import java.math.BigDecimal; public class Main { public static BigDecimal calculateInterest(BigDecimal amount, BigDecimal rate, long days) { return amount.multiply(rate).multiply(new BigDecimal(days / 360.0 / 100.0)); } }