function Zd () : string; var o : integer; c : char; name : string; begin read (c); While c <> ' ' do begin name := name + c; read (c); end; readln (o); if o > 2 then Result := name else Result := '0'; end;
var r : array [1..100] of string; p,k,i : integer; name : string; begin readln (k); p := 1; for i := 1 to k do begin name := Zd(); if name <> '0' then begin r[p] := name; p := p +1; end; end; writeln (); for i := 1 to k do writeln (r[i]); end.
Answers & Comments
1
function Zd () : string;
var
o : integer;
c : char;
name : string;
begin
read (c);
While c <> ' ' do
begin
name := name + c;
read (c);
end;
readln (o);
if o > 2 then
Result := name
else
Result := '0';
end;
var
r : array [1..100] of string;
p,k,i : integer;
name : string;
begin
readln (k);
p := 1;
for i := 1 to k do
begin
name := Zd();
if name <> '0' then
begin
r[p] := name;
p := p +1;
end;
end;
writeln ();
for i := 1 to k do
writeln (r[i]);
end.