|
zadach28.BAS |
|
{* Задача28 *}REM basic ' Заменить символы в строке, расположенные между скобками.CLS
Dim S As String, R As String, C As String * 1
INPUT "Vvedite stroku:", S
For i = 1 To LEN(S)
C = Mid$(S, i, 1)
If C = "(" Then f = f + 1
If C = ")" Then f = f - 1
If C = "/" Then z = 1
If f > 0 And C "(" And C ")" And z = 0 Then C = "?"
R = R + C
Next
PRINT "Result: "; R
End
|