"BUBBLE SORT!" #P,A; $P "HOW MANY NUMBERS? " N? = N. 26 - [ "TOO MANY!" @ ] "ENTER " N. ! " NUMBERS!" N N. 1 - = #F,M,0,N.,%A M. + ? = ; "INPUT ARRAY!" #F,M,0,N.,%A M. + . ! " "; "!" #B,%A,0,N.; "SORTED ARRAY!" #F,M,0,N.,%A M. + . ! " "; "!" @ $B #F,I,%B1 +,%C, #F,J,%C,I., %A J. 1 - + . %A J. + . - [ #E,%AJ. +,%AJ. 1 - +;];; @ $F %A %B = %C %A. - 1 + [ ( %C %A. - 1 + ^ %D %A %A. 1 + = ) @ ] ( %A. %C - 1 + ^ %D %A %A. 1 - = ) @ $E %A %B. %B %A. = = @ $$