Реферат: Билеты по информатике 10 класс: Visual Basic
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)) / 2
Call Swap(S1, i, Len(S1) - (i - 1))
Next i
S = S1
MsgBox (S)
End Sub
4
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(S1)) / 2