Рефераты

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

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

|Билет №2 | |

|1 |K = K + 1 |

|Do While L } S|If K > |

|выполняется |Len(Sogl) |

|S |Then K = 1 |

|}если L-истина |S1 = S1 + |

|Loop |Mid(Sogl, K, |

|} |1) |

| |End If |

| |Next i |

|Do |For i = 1 To |

|}S выполняется |Len(S1) - 5 |

|S |Step 6 |

|}пока L-истина |Call Swap(S1,|

|Loop While L } |i, i + 5) |

| |Call Swap(S1,|

|Do |i + 2, i + 3)|

|}S выполняется | |

|S |Call Swap(S1,|

|}вечно, пока не|i + 1, i + 4)|

| | |

|[exit do] }|Next i |

|будет перехода |S = S1 |

|Loop }|MsgBox (S) |

|к exit do |End Sub |

| |4 |

|While L |Sub |

|}то же, что и |Раскодировщик|

|S }Do |() |

|while...Loop |Dim S As |

|Wend }|String, i As |

| |Long |

| |Dim S1 As |

|Do Until L }S |String, c As |

|выполняется |String |

|S }если|Dim Gl As |

|L-ложь |String, K As |

|Loop |Long |

|} |S = |

| |InputBox("Вво|

|Do |д шифра") |

|}S выполняется |Gl = |

|S |"бвгджзклмнпр|

|}пока L-ложь |стфхцчшщъь" |

|Loop Until L} |For i = 1 To |

| |Len(S) - 5 |

|for i=i0 to iк |Step 6 |

|step h}S |Call Swap(S, |

|выполняется |i, i + 5) |

|S |Call Swap(S, |

|}пока i0 не |i + 2, i + 3)|

|дос- | |

|[Exit for] |Call Swap(S, |

|}тигнет |i + 1, i + 4)|

|значения | |

|Next i |Next i |

|}ik .Шаг – h |For i = 1 To |

|2 |Len(S) |

|Sub Знаки() |c = Mid(S, i,|

|Dim S As |1) |

|String, En As |S1 = S1 + c |

|String |If InStr(Gl, |

|Dim nEn As |c) > 0 Then i|

|Integer, i As |= i + 1 |

|Long |Next i |

|S = |MsgBox (S1) |

|InputBox("Введи|End Sub |

|те текст") |5 |

|En = |Sub Замена() |

|"abcdefghijklmn|Dim S As |

|opqrstuvwxyz" |String, S1 As|

|nEn = 0 |String |

|For i = 1 To |Dim n As |

|Len(S) |Long, C As |

|If (InStr(En, |String |

|Mid(S, i, 1), |Dim Name As |

|1)) > 0 Then |String |

|nEn = nEn + 1 |S = |

|End If |InputBox("Вво|

|Next i |д строки") |

|MsgBox ("Кол-во|Name = |

|=" + Str(nEn)) |InputBox("Вво|

|End Sub |д Имени") |

|3 |n = 0 |

|Sub Swap(S As |For i = 1 To |

|String, i As |Len(S) |

|Long, j As |C = Mid(S, i,|

|Long) |1) |

|Dim c As String|If Mid(S, i, |

| |3) = "Имя" |

|c = Mid(S, i, |Then |

|1) |S1 = S1 + |

|Mid(S, i, 1) = |Name |

|Mid(S, j, 1) |n = n + 1 |

|Mid(S, j, 1) = |i = i + 2 |

|c |ElseIf Mid(S,|

|End Sub |i, 7) = |

|Sub шифр() |"Фамилия" |

|Dim S As |Then |

|String, Sogl As|S1 = S1 + |

|String |Name |

|Dim S1 As |i = i + 6 |

|String, c As |n = n + 1 |

|String |Else |

|Dim Gl As |S1 = S1 + C |

|String, K As |End If |

|Long |Next i |

|Dim i As Long |MsgBox (S1) |

|Sogl = |MsgBox (n) |

|"аеиоуыэюяё" |End Sub |

|S = | |

|InputBox("Ввод | |

|строки") | |

|Gl = | |

|"бвгджзклмнпрст| |

|фхцчшщъь" | |

|For i = 1 To | |

|Len(S) | |

|c = Mid(S, i, | |

|1) | |

|S1 = S1 + c | |

|If InStr(Gl, c)| |

|> 0 Then | |


© 2010 Современные рефераты