import java.util.Scanner;
class IntFunction
{
double Sell = 0.0265;
void yuio()
{
System.out.println("请输入存款金额");
Scanner sc = new Scanner(System.in);
double mokey = sc.nextDouble();
System.out.println("请输入年限");
Scanner sc1 = new Scanner(System.in);
double year = sc1.nextDouble();
for (int i = 1; i <= year; i++) {
mokey = mokey + ((mokey / 100) * 2.65);
}
System.out.println(mokey);
}
}
class Main
{
public static void main(String[] args)
{
IntFunction a = new IntFunction();
a.yuio();
}
}
Java 小白 银行问题
最新推荐文章于 2022-03-22 13:30:10 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)