精选优质文档-倾情为你奉上VB编程题代码43例1、求100以内的素数。 Private Sub Form_Click()Dim i%, j%For i = 2 To 100For j = 2 To i - 1If i Mod j = 0 Then Exit ForNext jIf j = i Then Print iNext iEnd Sub2、从键盘输入任意长度的字符串,要求将字符顺序倒置,例如,将输入的“ABCDEFG”变换成“GFEDCBA”。 Private Sub Command1_Click()Dim a$, I%, c$, d$, n%a = InputBox$(输入字符串) n = Len(a)For I = 1 To Int(n 2)c = Mid(a, I, 1)Mid(a, I, 1) = Mid(a, n - I + 1, 1)Mid(a, n - I + 1, 1) = cNext IPrint aEnd Sub3、计算0200之间所有能被11或5