DIM St AS STRING, cfr, maxp
CLS
St = "proverka 3 poiska 345 naibol'shej 45674 posledovatelnosti 45 cifr 1"
FOR i = 1 TO LEN(St)
p = ASC(MID$(St, i, 1))
IF p > 47 AND p < 58 THEN cfr = cfr + 1 ELSE cfr = 0
IF cfr > maxp THEN maxp = cfr
NEXT
PRINT "Stroka:";: WRITE St
PRINT "Maksimalno cifr v stroke:"; maxp
Тестирование выполнено в программе QB64 ( Скачать )