fork download
  1. program ideone;
  2. var s,p:string;
  3. t,k:integer;
  4. i:byte;
  5. begin
  6. s:='tursun udriin mend hurgey';
  7. k:=length(s);
  8. t:=1;
  9. for i:=1 to k do;
  10. if s[i]=' ' then t:=t+1;
  11. writeln(t)
  12. end.
Success #stdin #stdout 0s 5304KB
stdin
Standard input is empty
stdout
1