CLS DIM str AS STRING DIM str1(26) AS INTEGER DIM str2(26) AS STRING DIM a(200) AS STRING DIM c1 AS STRING str = "abcdefghijklmnopqrstuvwxyz." WHILE a(K) <> MID$(str, 27, 1) K = K + 1 INPUT a(K) FOR i = 1 TO 26 str2(i) = MID$(str, i, 1) IF a(K) = MID$(str, i, 1) THEN str1(i) = str1(i) + 1 i = 26 END IF NEXT i WEND FOR s = 1 TO 26 FOR d = s TO 26 IF str1(d) < str1(s) THEN c = str1(d): str1(d) = str1(s): str1(s) = c: c1 = str2(d): str2(d) = str2(s): str2(s) = c1: NEXT d NEXT s FOR i = 1 TO 26 IF str1(i) <> 0 THEN PRINT str2(i); NEXT i
CLS DIM str AS STRING DIM str1(200) AS STRING DIM fio(200) AS STRING DIM tt(200) AS INTEGER DIM c1 AS STRING INPUT str T = VAL(MID$(str, 1, 2)) * 60 + VAL(MID$(str, 4, 2)) PRINT T INPUT N FOR i = 1 TO N INPUT str1(i) l = LEN(str1(i)) tt(i) = VAL(MID$(str1(i), l - 4, 2)) * 60 + VAL(MID$(str1(i), l - 1, 2)) fio(i) = MID$(str1(i), 1, l - 5) PRINT tt(i) NEXT i FOR s = 1 TO N FOR d = s TO N IF tt(d) < tt(s) THEN c = tt(d): tt(d) = tt(s): tt(s) = c: c1 = fio(d): fio(d) = fio(s): fio(s) = c1: NEXT d NEXT s FOR i = 1 TO N IF tt(i) - T <= 120 THEN PRINT fio(i): NEXT i
CLS DIM str AS STRING DIM str1 AS STRING DIM a(200) AS integer str = "123456789" INPUT str1 l=len(str1) FOR i = 1 TO 9 a(i)=i FOR j = 1 TO l IF a(i) = val(MID$(str1, j, 1)) THEN a(i) = 0 j=10 k=k+1 END IF next j next i if k=l then PRINT 0 else FOR i = 1 TO 9 IF a(i) <> 0 THEN PRINT a(i); NEXT i end if
DIM str1(200) AS STRING DIM g(12) AS INTEGER DIM k(12) AS INTEGER INPUT "Общее количество всех учеников", N FOR i = 1 TO 12 g(i)=i k(i)=0 NEXT i FOR i = 1 TO N INPUT str1(i) l = LEN(str1(i)) - 1 str1(i) = LEFT$(str1(i), l) FOR j = 1 TO 12 IF j = VAL(MID$(str1(i), LEN(str1(i))-1, 2)) THEN k(j) = k(j) + 1 END IF NEXT j NEXT i FOR s = 1 TO 12 FOR d = s TO 12 IF k(d) > k(s) THEN c = k(d): k(d) = k(s): k(s) = c: c1 = g(d): g(d) = g(s): g(s) = c1: NEXT d NEXT s FOR i = 1 TO 3 z = z + k(i) NEXT i PRINT z FOR i = 1 TO 3 if k(i)<> then PRINT g(i); NEXT i
CLS DIM str AS STRING DIM str1 AS STRING DIM str2 AS STRING DIM a(200) AS STRING INPUT "kod", str str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ" str2 = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz" K = 200 L = LEN(str) FOR i = 1 TO L FOR j = 1 TO 26 IF MID$(str, i, 1) = MID$(str1, j, 1) OR MID$(str, i, 1) = MID$(str2, j, 1) THEN m = m + 1 j = 26 ELSE IF m > 0 AND m < K THEN K = m m = 0 END IF END IF NEXT j NEXT i FOR i = 1 TO L a(i) = MID$(str, i, 1) FOR j = 27 TO 52 IF MID$(str, i, 1) = MID$(str1, j, 1) THEN a(i) = MID$(str1, j -( 1 + K), 1): j = 52 IF MID$(str, i, 1) = MID$(str2, j, 1) THEN a(i) = MID$(str2, j -( K + 1), 1): j = 52 NEXT j NEXT i FOR i = 1 TO L PRINT a(i); NEXT i