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 发布
本文适合Java初学者,通过分析银行系统的基本操作,如存款、取款、查询余额等,深入理解Java编程概念。文章详细解释了如何使用Java实现简单的银行账户类,涵盖了类的定义、对象创建及方法调用等核心知识点。

7251

被折叠的 条评论
为什么被折叠?



