编程问题 [英] Programing question

查看:86
本文介绍了编程问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此问题中,您将 使用while或do循环来计算某些给定投资增长到大于最终预期投资(S)所需的最少年限.用户将在文本框中输入S,P,snd r.这是我们的工作 使用适当的循环找出t.您必须使用循环.我知道您可以使用代数和自然对数来分离t.兴趣类型.

in this question you will  use a while or do loop to calculate the minimum amount of years it will take for some given investment to grow to a larger than the final expected investment (S). the user will enter S,P, snd r into text boxes. it is our job to use the appropriate loop to figure out t. You must use loops. I know you could use algebra and natural logs to isolate t. the type of interest .

 

连续利息是复利的一种形式.在持续关注的情况下,复合期的长度被认为是无限短的.因此,利益不断增加.

Continous interest is a form of compound interest. With continous interest the length of the compounding period is reasoned to be infinitely small. The interest, therefore, is compounded continously.

 

公式

S =投资的最终价值

S= final value of investment

P =投资的初始价值

P= intial value of investment

r =年度百分比(APR)

r= annual percentage rate (APR)

t =年数

e =大约2.7183

e= approximately 2.7183

t年后的投资价值:

S = Pe(rt)

S=Pe(rt)

提示:您将在此问题中做什么就是从您的时间t非常小= 1开始,并且每次循环时,都增加时间,直到您获得的S值大于所需的值.

Hint: what you will do in this question  is to start of with your time t being very small = 1 and each time you loop, increment the time untill you get your S value greater that what you were looking for. 

推荐答案

在2010年12月16日下午3:11,Hira23写道:

On 12/16/2010 3:11 PM, Hira23 wrote:

在此问题中,您将 使用while或do循环来计算
某些特定投资所需的最短年限
增长到大于最终预期投资(S).用户
将在文本框中输入S,P,snd r.使用
是我们的工作 找出t的适当循环.您必须使用循环.我认识你
可以使用代数和自然对数来分离t.兴趣类型

in this question you will  use a while or do loop to calculate the
minimum amount of years it will take for some given investment to
grow to a larger than the final expected investment (S). the user
will enter S,P, snd r into text boxes. it is our job to use the
appropriate loop to figure out t. You must use loops. I know you
could use algebra and natural logs to isolate t. the type of interest

您的教授的电子邮件地址是什么?我将答案直接发送给他或她,而无需通过中间人.

What's the email address of your professor? I'll send the answer directly to him or her, no need to go through a middleman.


这篇关于编程问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆