Программа шифровки: DATA "ауоыэяюёие" DATA "бвгджзклмнпрстфхцчшщ" DATA "ъйь" DIM s10 AS STRING, s20 AS STRING, s3 AS STRING DIM i AS INTEGER DIM s AS STRING, t AS STRING CLS READ s10, s20, s3 RANDOMIZE TIMER INPUT "Введите фразу: ", s t = "" FOR i = 1 TO LEN(s) t = t + MID$(s, i, 1) t = t + MID$(s10, INT(10 * RND + 1), 1) t = t + MID$(s20, INT(20 * RND + 1), 1) t = t + MID$(s3, INT(3 * RND + 1), 1) NEXT i PRINT t END
Программа дешифровки: DIM s AS STRING, t AS STRING, i AS INTEGER CLS INPUT "Введите фразу: ", s t = "" FOR i = 1 TO LEN(s) STEP 4 t = t + MID$(s, i, 1) NEXT i PRINT t END
234567891011121314151617181920212223procedure CountingSort(var X: array of integer; min, max: integer);var counter: array[0..100000] of integer; i, j, index: Integer;begin // для всех элементов массива // указываем значение ноль for i:=0 to high(counter) do tmpX[i]:=0; for i:=min to max do counter[ar[i]]:=counter[ar[i]]+1; // устанавливаем значение // в правильную позицию index:=min; for i:=min to high(counter)-1 do begin for j:=0 to counter[i]-1 do begin ar[index]:=i; index:=index+1; end; end;end;
DATA "ауоыэяюёие"
DATA "бвгджзклмнпрстфхцчшщ"
DATA "ъйь"
DIM s10 AS STRING, s20 AS STRING, s3 AS STRING
DIM i AS INTEGER
DIM s AS STRING, t AS STRING
CLS
READ s10, s20, s3
RANDOMIZE TIMER
INPUT "Введите фразу: ", s
t = ""
FOR i = 1 TO LEN(s)
t = t + MID$(s, i, 1)
t = t + MID$(s10, INT(10 * RND + 1), 1)
t = t + MID$(s20, INT(20 * RND + 1), 1)
t = t + MID$(s3, INT(3 * RND + 1), 1)
NEXT i
PRINT t
END
Программа дешифровки:
DIM s AS STRING, t AS STRING, i AS INTEGER
CLS
INPUT "Введите фразу: ", s
t = ""
FOR i = 1 TO LEN(s) STEP 4
t = t + MID$(s, i, 1)
NEXT i
PRINT t
END