> Тестовая программа 3

var
    a : word;
    b : word;
    c : word;
    d : one[10];
    e : word;
    f : word;
    g : word;
    h : word;

start

    clrscr;
    def a = 0;
    def b = 9;
    while { a <= b } do start
       print " Введите число в ";
       print a;
       print " элемент массива ";
       input c;
       def d[a] = c;
       def a = a + 1;
       print "#";
    end;
    def f = 1;
    def e = 0;
    while { f <> e } do start
      def a = 0;
      def b = 9;
      def f = 0;
      while { a << b } do start
        def g = d[a];
        def c = a + 1;
        def h = d[c];
        if { g << h } then start
           def d[a] = h;
           def d[c] = g;
           def f = 1;
        end;
        def a = a + 1;
      end;
    end;
    print " Сортировка по возрастанию #";
    def a = 0;
    def b = 9;
    while { a <= b } do start
       def c = d[a];
       print c;
       def a = a + 1;
    end;
end.