Saturday, 01.24.2026, 7:35 AM
Welcome Guest | RSS
Main | trangBK - Forum | Registration | Login
Site menu
Login form
Site friends
Our poll
Rate my site
Total of answers: 32
You are welcome!
[ New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
trangBK
VietTruong_sptinK43bDate: Thursday, 05.28.2009, 2:40 PM | Message # 1
Private
Group: Users
Messages: 1
Reputation: 0
Status: Offline
var s,st,max:string;
i,t,j:integer;
begin
write('nhap xau: ');
readln(st);
write('nhapL: ');
readln(s);

if st[1]=' ' then j:=0
else j:=1;
for i:=2 to length(st) do
if (st[i]<>' ') and (st[i-1]=' ') then
j:=j+1;
writeln('So tu cua xau la: ',j);
write('Xau nguoc. la: ');
for i:=length(st) downto 1 do
write(st[i]);
st[1]:=upcase(st[1]);
for i:=2 to length(st) do
if (st[i]<>' ')and(st[i-1]=' ') then
st[i]:=upcase(st[i]);
t:=0;
while pos(s,st)<>0 do
begin
t:=t+1;
st:=Delete(st,pos(s,st),length(s));
end;
writeln('so lan xuat hien la ',t);
readln;
end.
cry cry

 
  • Page 1 of 1
  • 1
Search:
Free web hostinguCozCopyright MyCorp © 2026