Make algorithm for simple interest