XAU

Document Sample
scope of work template
							uses crt; const f1='xau.dat'; type xau=string; var st1,st2,st3:xau; {----------} procedure doc; var f:text; begin assign(f,f1); reset(f); readln(f,st1); readln(f,st2); readln(f,st3); close(f); Writeln('Cac xau ban dau la:'); writeln('Xau1:',st1); writeln('Xau2:',st2); writeln('Xau3:',st3); end; {-----------} procedure xuli; var n,m,i,j:integer; kt:boolean; begin writeln('Cac phep bien doi:'); n:=length(st1);i:=1;j:=1;m:=length(st3); while i<=n do begin j:=1;kt:=false; while (j<=n) and not kt do begin if st1[i]=st2[j] then if j<=m then begin writeln(st1[i],',',i,',',j,',',st3[j]); st1[i]:=st3[j]; kt:=true; end; inc(j); end; i:=i+1; end; writeln('Xau 1 sau khi bien doi la:'); writeln(st1); end; {--------------} begin clrscr; doc; xuli; readln; end.


						
Related docs