This ar the basic programs that i did in highschool. From very simple to medium programs. From array

源代码在线查看: a68.pas

软件大小: 73 K
上传用户: a215290209
关键词: programs From highschool medium
下载地址: 免注册下载 普通下载 VIP

相关代码

				var f,g:text;
				    max,i,j,p:integer;
				    v:array[1..20] of string;
				    aux:string;
				begin
				assign(f,'f.txt');reset(f);
				assign(g,'g.txt');rewrite(g);
				p:=0;
				while not eof(f) do begin
				                    inc(p);
				                    read(f,v[p]);
				                    readln(f);
				                    end;
				for i:=1 to p-1 do
				     for j:=i+1 to p do
				        if length(v[i])				                                          aux:=v[i];
				                                          v[i]:=v[j];
				                                          v[j]:=aux;
				                                          end;
				for i:=1 to p do
				   writeln(g,v[i]);
				close(f);
				close(g);
				end.
							

相关资源