[r]
(1){viet chuong trinhnhap vao chuoi tu ban phim va in chuoi thu duoc bang cac loai bo cac dau cach neu co,de lai dau cach} var s:string; i,t,j,d:integer; begin write('nhap vao xau :'); readln(s); while (s[1]=' ') begin delete(s,1,1); i:=i-1; end; for i:=1 to length(s) if (s[i]=' ') and (s[i+1]=' ') then begin delete(s,i,1); i:=i-1; d:=d-1; end; writeln('xau ki tu lai la:',s); readln; end (2)