vb中用for、do…loop和while…wend循环三种形式分别求3的n次方

问题描述:

vb中用for、do…loop和while…wend循环三种形式分别求3的n次方
1个回答 分类:综合 2014-10-28

问题解答:

我来补答
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer = 1, n As Integer
Dim sum As Integer = 1
n = InputBox("请输入一个整数")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''for循环
'For i = 1 To n Step 1
' sum = sum * 3
'Next
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''while循环
'While i
 
 
展开全文阅读
剩余:2000