a = input('Enter array to sort: ');

n = length(a);
right = n-1;
for ii = 1: n-1
   for jj = 1: right
      if gt(a(jj), a(jj+1))
         tmp = a(jj);
         a(jj) = a(jj+1);
         a(jj+1) = tmp;
      end
   end
   right = right - 1;
end

disp(a);

