求大神帮忙写一个初级java(内附题目)
Write a Java program for a bank that will calculate the monthly interest earned on a cashdeposit. The user enters the amount deposited, the term, and interest rate. The program willthen display a table listing for the month, interest, total interest, and account balance for eachperiod. For example, if the amount deposited is $2000.00, the term is 6 months and theinterest rate is 2%, the following output will be displayed: 编写一个Java程序,将计算银行每月的现金存款所赚取的利息。用户输入存入的金额,期限,利率。该计划将显示表中列出的为一个月,利息,利息总额,帐户余额为每个时期。例如,如果存入的金额是$ 2000.00,期限为6个月,利率为2%,将显示以下输出:
程序代码:
Period Interest Total Interest Total Balance 1 6.66 6.66 2006.66 2 6.69 13.35 2013.35 3 6.71 20.06 2020.06 4 6.74 26.80 2026.80 5 6.75 33.55 2033.55 6 6.78 40.33 2040.33
Initial deposit: $2000.00
Total Interest: $40.33
Total Balance: $2040.33