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

nPr = 0

For i = 1 To Len(S)

If (InStr(Pr, Mid(S, i, 1))) > 0 Then

nPr = nPr + 1

End If

Next i

MsgBox ("Кол-во =" + Str(nPr))

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, 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

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