VB程序改错

1.○

Option Explicit

Dim a(19) As Integer

Private Sub Command1_Click() Randomize Dim i%

Picture1.Cls Picture2.Cls For i = 0 To 19

'**********FILL********** a(i) = Int(Rnd * 101)

Picture1.Print a(i);

'**********FILL**********

If (i + 1) Mod 10 = 0 Then Picture1.Print Next i End Sub

Private Sub Command2_Click() Dim i%

Dim s1%, s2%, s3%, s4%, s5% Picture2.Cls For i = 0 To 19

'**********FILL**********

If a(i) >= 0 And a(i) <= 59 Then s1 = s1 + 1 '**********FILL**********

If a(i) >= 60 And a(i) <=69 Then s2 = s2 + 1 '**********FILL**********

If a(i) >= 70 And a(i) <= 79 Then s3 = s3 + 1 '**********FILL**********

If a(i) >= 80 And a(i) <= 89 Then s4 = s4 + 1 '**********FILL**********

If a(i) >= 90 Then s5 = s5 + 1

Next

Picture2.Print \的有:\人\

Picture2.Print \的有:\人\ Picture2.Print \的有:\人\ Picture2.Print \的有:\人\ Picture2.Print \的有:\人\End Sub

'------------------------------------------------ 2 '【程序改错】 ○

'------------------------------------------------

'题目:下面程序可输出如下图形: ' * ' *** ' ***** ' ******* ' *********

'------------------------------------------------ Option Explicit

Private Sub Form_Click()

Dim m As Integer, n As Integer, s As String, i As Integer, j As Integer n = 4 m = 1 s = \

For i = 5 To 1 Step -1

'**********ERROR********** Print Spc(n) ;

For j = 1 To 2 * m - 1 Print s; Next j Print

'**********ERROR********** n = n - 1

'**********ERROR********** m = m + 1 Next i End Sub

Option Explicit

Private Sub Form_Click() Dim i%

For i = 1 To 5

Print Tab(3 * i); \★\(17 - 3 * i, \☆\★\ Next i

Print Tab(18); \☆\ For i = 5 To 1 Step -1

Print Tab(3 * i); \☆\17 - 3 * i, \★\☆\ Next i End Sub

Option Explicit '

'【程序说明】下面是一段计算数学表达式的程序。 '

'注意:不要删除'******* FILL ******,否则影响评分成绩 '去掉__________,填写代码。

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4