Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program Project25;
- {$APPTYPE CONSOLE}
- {$R *.res}
- uses
- System.SysUtils;
- var
- s, new_s, min, word:string;
- i, count:Byte;
- begin
- Writeln('input s:');
- readln(s);
- Writeln('s: ',s);
- trim(s);
- new_s:=s[1];
- count := 1;
- min := s;
- for i := 2 to length(s) do
- if (s[i-1] = ' ') and (s[i] <> ' ') then
- begin
- new_s := new_s + s[i];
- Inc(count);
- end;
- writeln('new_s: ',new_s);
- Writeln('count =',count);
- Readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment