Реферат: Билеты по информатике 10 класс: Visual Basic
Dim c As String
c = Mid(S, i, 1)
Mid(S, i, 1) = Mid(S, j, 1)
Mid(S, j, 1) = c
End Sub
Sub шифр( )
Dim S As String, Sh As String
Dim S1 As String, c As String
Dim Gl As String, K As Long
Dim i As Long
Sh = "Шаблон"
S = InputBox("Ввод строки")
Gl = "аеиоуыэюяё"
For i = 1 To Len(S)
c = Mid(S, i, 1)
S1 = S1 + c
If InStr(Gl, c) > 0 Then
K = K + 1
If K > Len(Sh) Then K = 1
S1 = S1 + Mid(Sh, K, 1)
End If
Next i
For i = 1 To Len(S1) - 1 Step 2
Call Swap(S1, i, i + 1)
Next i
For i = 1 To Len(S1) - 2 Step 3
Call Swap(S1, i, i + 2)
Next i
S = S1