计算单利息的程序

2025年1月8日 | 阅读需时 2 分钟

说明

单利是一种方便的方法,用于银行和经济部门计算贷款的利息费用。它通过一些数学术语进行日复一日的估算。

公式

算法

  1. 定义贷款的本金、利息和时间。
  2. 应用公式。
  3. 打印单利。

复杂度

O(1)


解决方案

Python

输出

 Simple Interest is:  750.0

C

输出

Simple Interest is:  51000.000

JAVA

输出

Simple Interest is:  3120.0

C#

输出

Simple Interest is:  300.00

PHP

输出

Simple Interest is: 200
 
下一主题#