- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
procedure makeWord(var str : string; var word : string);
var j, p,tp : integer;
begin
j:= 1;
p := pos(' ', str);
if (p = 0) then p:= length(str);
word := copy(str, 0, p);
delete(str, 0, p);
while (str[j] = ' ') or (str[j] = ''#9'') do begin
Inc(j);
end;
if (j > 0) then begin
delete(str,0,j-1);
end;
end;
var i,p,n : integer;
str, word : string;
begin
str := 'I want to tell you!';
readln(n);
for i:= 1 to n do begin
makeWord(str,word);
writeln(word);
end;
readln;
end.