DATA Z,Y,X,W,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C,B,A
CLS
DIM Alf(26) AS STRING * 1
' Schitaem bukvi
FOR i = 1 TO 26
READ Alf(i): PRINT Alf(i);
NEXT: PRINT CHR$(13) + "Result:"
' Sortiruem
FOR iy = 25 TO 1 STEP -1: FOR ix = iy TO 25
IF ASC(Alf(ix + 1)) < ASC(Alf(ix)) THEN SWAP Alf(ix), Alf(ix + 1)
NEXT ix, iy
' Ruzultat
FOR i = 1 TO 26
PRINT Alf(i);
NEXT
Следующий вариант
DATA Z,Y,X,W,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C,B,A
CLS
DIM Alf(26) AS STRING * 1
' Schitaem bukvi
FOR i = 1 TO 26
READ Alf(i): PRINT Alf(i);
NEXT: PRINT CHR$(13) + "Result:"
' Sortiruem
FOR iy = 25 TO 1 STEP -1: FOR ix = iy TO 25
IF Alf(ix + 1) < Alf(ix) THEN SWAP Alf(ix), Alf(ix + 1)
NEXT ix, iy
' Ruzultat
FOR i = 1 TO 26
PRINT Alf(i);
NEXT
Тестирование выполнено в программе QB64 ( Скачать )