copyright 1998 by brian zhou this is by far none of my best code program words uses crt Var Blarg String new string count byte Procedure Blag Var B Byte prev cur char Begin While Pos \' \' Blarg 1 do if pos \' \' blarg 1 then delete Blarg 1 1 B 1 While B Length Blarg Do Begin if b 1 then prev blarg b 1 else prev 1 cur blarg b if cur \' \' then new new cur else if prev \' \' and prev 1 then begin new new \' \' inc count end inc b End if length new 0 then exit if new length new \' \' then inc count if new length new \' \' then delete new length new length new End begin clrscr WriteLn \'Enter text to be processed\' readln blarg writeln WriteLn \'Before processing \' WriteLn \' \' Blarg \' \' Blag WriteLn \'After processing \' write \' \' Write new writeln \' \' writeln count \' words \' readkey end SAUCE00word counter source irrational think 9980126o5