VB中的一系列问题

编程入门 行业动态 更新时间:2024-10-27 21:11:14
本文介绍了VB中的一系列问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

hi ,, 在控制台应用程序的Visual Studio 2008中工作 并在解决此问题时遇到了麻烦: e = x + x ^ 2/2!+ x ^ 3/3!+ ... 请提供任何帮助,我将不胜感激

, am working on visual studio 2008 on console application and am having a trouble solving this problem: e=x+x^2/2!+x^3/3!+... plzz any help i''d appreciate it

推荐答案

您在担心什么? 您知道,Visual Basic提供了迭代. What is you trouble about? You know, Visual Basic provide iterations.

首先,公式是错误的,右边是产生exp(x)或e ^ x而不是e的无穷多项式. 现在你有什么问题?右边是项的总和,只要知道前一项的值,就可以轻松计算出每个项.两个建议: -使用双打 -确保将序列继续足够长的时间,即直到最新项仅是到目前为止部分和的一小部分(例如1/10 ^ 15). 只需一个简单的循环即可! :) Hi, first of all your formula is wrong, the right hand side is the infinite polynomial that yields exp(x) or e^x, not e. now what is your problem? the right hand side is the sum of terms, each term can easily be calculated once the value of the previous one is known. Two suggestions: - use doubles - make sure to continue the series long enough, i.e. till the newest term is only a fraction (say 1/10^15) of the partial sum so far. A simple loop is all it takes! :)

一个词:递归. 其余的可以在教科书中找到. One word: Recursion. The rest can be found in your text book.

更多推荐

VB中的一系列问题

本文发布于:2023-10-07 17:15:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1469998.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:系列   VB

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!