Make your own free website on Tripod.com

Thai Banner
Thai Banner


<-HOME  <-FLOWCHART
PROGRAM Number10;
USES crt;
VAR num,n,i,k,a:integer;
    value:ARRAY[1..10] OF integer;
BEGIN
    clrscr;
    k:=3;
    for i:=1 to 10 do
       begin
           gotoxy(20,k);write('Value',i,' = ');read(value[i]);
	   k:=k+1;
       end;
    k:=k+1;
    for i:=1 to 10 do
    begin
      for n:=1 to num-1 do
      begin
           if value[n] > value[n+1] then
           begin
              a:=value[n];
	      value[n]:=value[n+1];
              value[n+1]:=a;
           end
      end;
    end;
    clrscr;
    gotoxy(20,5);write('Ascending Order');
    k:=7;
    for i:= 1 to 10 do
    begin
    gotoxy(20,k);write('Value',n,' := ',value[i]);
    k:=k+1;
    end;
    writeln('Program by Miss Orathai Jaiyah 4411063');
END.