|
zadach23.BAS |
|
{* Задача23 *}REM basic ' Поиск повторяющихся слов в текстеINPUT "vvedite Text"; a$
Dim b$(LEN(a$))
For i = 1 To LEN(a$)
If Mid$(a$, i, 1) " " And Mid$(a$, i, 1) "." Then
c$ = c$ + Mid$(a$, i, 1)
Else k = k + 1: b$(k) = c$: c$ = ""
End If
Next
For i = 1 To k
For j = i + 1 To k
If b$(i) = b$(j) Then f = 1: b$(j) = STR$(j)
Next
If f = 1 Then q = q + 1: f = 0
Next
PRINT "q ="; q
End
|