Реферат: Билеты по информатике 10 класс: Visual Basic
End If
Next i
For i = 1 To Len(S1) - 5 Step 6
Call Swap(S1, i, i + 5)
Call Swap(S1, i + 2, i + 3)
Call Swap(S1, i + 1, i + 4)
Next i
S = S1
MsgBox (S)
End Sub
4
Sub Раскодировщик()
Dim S As String, i As Long
Dim S1 As String, c As String
Dim Gl As String, K As Long
S = InputBox("Ввод шифра")
Gl = "бвгджзклмнпрстфхцчшщъь"
For i = 1 To Len(S) - 5 Step 6
Call Swap(S, i, i + 5)
Call Swap(S, i + 2, i + 3)
Call Swap(S, i + 1, i + 4)
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
Next i
MsgBox (S1)
End Sub