Реферат: Билеты по информатике 10 класс: Visual Basic
Next i
For i = 1 To Len(S)
c = Mid(S, i, 1)
S1 = S1 + c
If InStr(Gl, c) > 0 Then
i = i + 1
End If
Next i
S = S1
MsgBox (S)
End Sub
5
Sub Замена()
Dim S As String, S1 As String
Dim n As Long, C As String
S = InputBox("Ввод строки")
n = 0
For i = 1 To Len(S)
C = Mid(S, i, 1)
If Mid(S, i, 1) = "#" Then
S1 = S1 + "Имя"
i = i + 2
n = n + 1
ElseIf Mid(S, i, 3) = "Имя" Then
S1 = S1 + "#"
i = i + 2
n = n + 1
Else
S1 = S1 + C