Реферат: Билеты по информатике 10 класс: Visual Basic

End Sub

3

Sub Swap(S As String, i As Long, j As Long)

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, Sogl As String

Dim S1 As String, c As String

Dim Gl As String, K As Long

Dim i As Long

Sogl = "бвгджзклмнпрстфхцчшщъь"

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(Sogl) Then K = 1

S1 = S1 + Mid(Sogl, K, 1)

End If

Next i

For i = 1 To Len(S1) - 4 Step 5

Call Swap(S1, i, i + 4)

Call Swap(S1, i + 1, i + 3)

Next i

К-во Просмотров: 891
Бесплатно скачать Реферат: Билеты по информатике 10 класс: Visual Basic