请帮我这个程序。迫切需要代码 [英] please help me with this program. in desperate need of the code

查看:46
本文介绍了请帮我这个程序。迫切需要代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




创建一个VB应用程序,用于计算用户指定的一系列值的累计和。


累计和数示例:


给定一系列数字:1 2 3 4 5


累计和序列:1 1 + 2 1 + 2 + 3 1 + 2 + 3 + 4 1 + 2 + 3 + 4 + 5


输出1 3 6 10 15 5。


申请应该


1。允许用户输入一系列数字的下限和上限。


2。单击"累积总和"按钮时,使用FOR循环,在列表框中计算并显示累积和序列,如下面的示例输出所示。


3。在必要时使用类变量和类型转换。


4。为类变量选择合适的数据类型。


5。将Option Strict设置为ON。


6。输出(累计总和)必须显示在表单上的列表框中。

解决方案

重复发布:

< a href ="https://social.msdn.microsoft.com/Forums/en-US/b6b8df06-57ab-4fda-8503-c32839c86bea/please-help-me-with-this-program-in-desperate-need-的最代码?论坛= vbgeneral"> https://social.msdn.microsoft.com/Forums/en-US/b6b8df06-57ab-4fda-8503-c32839c86bea/please-help-me-with-this-program论坛-in-绝望-需要的最码?= vbgeneral


Create a VB application that calculates the cumulative sum for a range of values specified by the user.

Cumulative Sum Example:

Given a range of numbers : 1 2 3 4 5

Cumulative Sum Sequence : 1 1+2 1+2+3 1+2+3+4 1+2+3+4+5

Output 1 3 6 10 15 5.

The application should

1. Allow the user to enter the lower limit and upper limit for a range of numbers.

2. When the button "Cumulative Sum" is clicked, using a FOR loop, calculate and display the cumulative sum sequence in a list box as shown in the sample output below.

3. Use class variables and type casting wherever necessary.

4. Choose an appropriate data type for the class variables.

5. Set Option Strict to ON.

6. The output (cumulative sum) must be displayed in a list box on the form.

解决方案

Duplicate post:
https://social.msdn.microsoft.com/Forums/en-US/b6b8df06-57ab-4fda-8503-c32839c86bea/please-help-me-with-this-program-in-desperate-need-of-the-code?forum=vbgeneral


这篇关于请帮我这个程序。迫切需要代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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