求大神用eclipse java 编写一个程序,全分送上,急求,谢谢了
Theprogramshouldpromptforandacceptthreevaluesfromtheuser:·theinitialdepositamount(ado...
The program should prompt for and accept three values from the user:
· the initial deposit amount (a double value representing the deposit value in dollars)
· the rate of interest earned per annum (yearly) on the account balance (a double value representing the actual interest rate percentage, for example, 6.0% would be entered as 6.0)
· the amount that is to be deposited to the account each month (assume the deposit amount for each month is the same).
Once the user has supplied the initial deposit amount and interest rate for the account as well as the monthly deposit amount, the program should then proceed to calculate the new balance for the account (including interest earned) over a six month period (taking into account the additional amount being deposited and the interest earned for each month).
This should be done without using loops of any kind, as the emphasis is on using variables to help break down a repetitive process into here.
A simple way of handling the calculation of the balance for each month of the investment period is shown below:
balance = balance + monthly deposit amount
interest = balance (current) * ((interest rate / 12) / 100)
balance (new) = balance (current) + interest
Note that the interest rate is per annum (across the entire year), so the interest rate percentage for each month is equivalent to the yearly interest rate divided by 12. 展开
· the initial deposit amount (a double value representing the deposit value in dollars)
· the rate of interest earned per annum (yearly) on the account balance (a double value representing the actual interest rate percentage, for example, 6.0% would be entered as 6.0)
· the amount that is to be deposited to the account each month (assume the deposit amount for each month is the same).
Once the user has supplied the initial deposit amount and interest rate for the account as well as the monthly deposit amount, the program should then proceed to calculate the new balance for the account (including interest earned) over a six month period (taking into account the additional amount being deposited and the interest earned for each month).
This should be done without using loops of any kind, as the emphasis is on using variables to help break down a repetitive process into here.
A simple way of handling the calculation of the balance for each month of the investment period is shown below:
balance = balance + monthly deposit amount
interest = balance (current) * ((interest rate / 12) / 100)
balance (new) = balance (current) + interest
Note that the interest rate is per annum (across the entire year), so the interest rate percentage for each month is equivalent to the yearly interest rate divided by 12. 展开
展开全部
不许用循环...好吧
public class F_uck_u_boss{
public static void main(String[] args){
...
}
public static double after6month(double deposit, double interest, double permonth){
double balance = deposit+permonth;
interest /= 1200;
balance = after1month(balance, interest);
balance = after1month(balance, interest);
balance = after1month(balance, interest);
balance = after1month(balance, interest);
balance = after1month(balance, interest);
balance = after1month(balance, interest);
return balance;
}
public static double after1month(double deposit, double interest){
return deposit*(1+interest);
}
}
public class F_uck_u_boss{
public static void main(String[] args){
...
}
public static double after6month(double deposit, double interest, double permonth){
double balance = deposit+permonth;
interest /= 1200;
balance = after1month(balance, interest);
balance = after1month(balance, interest);
balance = after1month(balance, interest);
balance = after1month(balance, interest);
balance = after1month(balance, interest);
balance = after1month(balance, interest);
return balance;
}
public static double after1month(double deposit, double interest){
return deposit*(1+interest);
}
}
展开全部
题目倒是不难,就是给三个double数,最初存入数额、年收益率、每月存入数额,算出6个月后的余额。但这个题目本身有问题啊,既然啊利率每年结算每月根本没有收益啊,怎么算6个月的余额?
追问
谢谢你啊,能快一点么,在明天之前
追答
什么啊你就采用了,好吧,你们都没看明白题目,正确答案也不给了!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
亲,题目呢,全英文,太高级,看不懂哈
追问
谢谢你啊,没有题目啊,就是写一个程序关于银行利息的,用程序写出用户得到利息的多少之内的把,但是不会用java编写
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询