我需要的是用户输入他们目前的银行余额,他们需要的金额和利率。我希望输出显示他们每年的余额,以及需要多少年才能达到所需的数量。谢谢你的帮助。at the end of year 1 is {0:C}", TotalAmount);//this shows the interest gained over 1 year
/
我使用的Do/While循环有问题。无论用户输入哪个字符或字符串,都会显示if块,即使未满足while条件。请记住,这段代码还没有完成,并且还没有使用所显示的一些变量。import java.util.Scanner;
public static void main (String [] args) {program