var s: string[120];
f: text;
d, i: byte;
Begin
Write('nhap xau: '); readln(s);
Assign(f, 'dulieu.dat'); rewrite(f);
D:=0;
For i:=1 to length(s) do
If s[i]=' ' then inc(d);
Write('co ', d, ' ki tu cach');
Write(f, 'co ', d, ' ki tu cach');
Close(f);
End.