For i=1 To 10 For j=1 To 10 If i=j Then Sum = Sum+ arrayl (i, End If Next j Next i Label Caption=Sum For i=l TO 10 Forj=1 To 10 If i= =j Then Sum=Sum+array1 (i, End If Next j Next i Label Caption=Sum For i=1 To 10 For j=1 To l0 If i=j Then Sum=Sum+arrayl (i, End If Next i Next j Lahel Caption=Sum For i=1 To 10 For j=1 To l0 If i=j Then Sum=arrayl (i, End If Next j Next i Label Caption=Sum
Private sub Command1_Click( ) sum=0 For 1=1 To 10 Sum=sum+1, Next I Print Sum End Sub Private sub Command1_Click( ) Sum=0,I=1 Do While l<=10 Sum=Sum+1 I=I+1 Print Sum End Sub Private Sub command1_click( ) Sum=0:I=1 Do Sum=Sum+1 I=I+1 Loop While I<10 Print Sum End Sub Private Sub command1_Click( ) Sum=0:I=1 Do Sum=Sum+1 l=I+1 Loop Until I<10 Print Sum End Sub