uses crt;
var s:string;
i,n:integer;
begin
write('Nhap xau:');readln(s);
if s[1]=#32 then n:=0 else n := 1;
for i:=2 to length(s)-1 do
if (s[i]=#32) and (s[i+1]<>#32) then inc(n);
write('So tu trong xau:',n);
readln
end.
uses crt;
var s:string;
i,n:integer;
begin
write('Nhap xau:');readln(s);
if s[1]=#32 then n:=0 else n := 1;
for i:=2 to length(s)-1 do
if (s[i]=#32) and (s[i+1]<>#32) then inc(n);
write('So tu trong xau:',n);
readln
end.
Var
s: string;
i, dem: byte;
begin
write('Nhap xau: '); readln(s);
s:=s+' ';
dem:=0;
for i:=1 to length(s)-1 do
if (s[i]<>' ') and (s[i+1]=' ') then dem:=dem+1;
write('So tu trong xau la: ',dem); readln;
End.
Var
s: string;
i, dem: byte;
begin
write('Nhap xau: '); readln(s);
s:=s+' ';
dem:=0;
for i:=1 to length(s)-1 do
if (s[i]<>' ') and (s[i+1]=' ') then dem:=dem+1;
write('So tu trong xau la: ',dem); readln;
End.