vb 输出数组怎么右对齐
答案:2 悬赏:80 手机版
解决时间 2021-01-31 14:40
- 提问者网友:临风不自傲
- 2021-01-31 04:32
vb 输出数组怎么右对齐
最佳答案
- 五星知识达人网友:患得患失的劫
- 2021-01-31 05:11
Option Explicit
Dim i As Integer
Dim a As Integer
Dim sum As Integer
Dim max As Integer
Dim min As Integer
Dim j As Integer
Private Sub Command1_Click()
Label1.Caption = "产生随机数如上图"
Label2.Visible = True
Label2.Caption = "其总和为:"
Label3.Visible = True
Label3.Caption = "最大值为:"
Label4.Visible = True
Label4.Caption = "最小值为:"
Print
max = 1
min = 100
For i = 1 To 100
Randomize
a = Int(Rnd * 100) + 1
Print Format(a, "@@@@@"); '只需要在这里改一下
If i Mod 10 = 0 Then Print
sum = sum + a
Text1.Text = sum
If a > max Then max = a
Text2.Text = max
If a < min Then min = a
Text3.Text = min
Next i
End Sub
Dim i As Integer
Dim a As Integer
Dim sum As Integer
Dim max As Integer
Dim min As Integer
Dim j As Integer
Private Sub Command1_Click()
Label1.Caption = "产生随机数如上图"
Label2.Visible = True
Label2.Caption = "其总和为:"
Label3.Visible = True
Label3.Caption = "最大值为:"
Label4.Visible = True
Label4.Caption = "最小值为:"
max = 1
min = 100
For i = 1 To 100
Randomize
a = Int(Rnd * 100) + 1
Print Format(a, "@@@@@"); '只需要在这里改一下
If i Mod 10 = 0 Then Print
sum = sum + a
Text1.Text = sum
If a > max Then max = a
Text2.Text = max
If a < min Then min = a
Text3.Text = min
Next i
End Sub
全部回答
- 1楼网友:不甚了了
- 2021-01-31 06:42
option explicit
dim i as integer
dim a as integer
dim sum as integer
dim max as integer
dim min as integer
dim j as integer
private sub command1_click()
label1.caption = "产生随机数如上图"
label2.visible = true
label2.caption = "其总和为:"
label3.visible = true
label3.caption = "最大值为:"
label4.visible = true
label4.caption = "最小值为:"
print
max = 1
min = 100
for i = 1 to 100
randomize
a = int(rnd * 100) + 1
print format(a, "@@@@@"); '只需要在这里改一下
if i mod 10 = 0 then print
sum = sum + a
text1.text = sum
if a > max then max = a
text2.text = max
if a < min then min = a
text3.text = min
next i
end sub
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯