Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- s, s1, s2 : string;
- l1, l2 : integer;
- begin
- readln(s);
- l1 := pos(s, ' '); s1 := s; delete(s1, l1, length(s)-l1+1); delete(s, 1, l1);
- l2 := pos(s, ' '); s2 := s; delete(s2, l2, length(s2)-l2+1); delete(s, 1, l2);
- if (length(s1) < length(s2) and (length(s2) < length(s)) then writeln(s1, s2, s);
- if (length(s2) < length(s1) and (length(s1) < length(s)) then writeln(s2, s1, s);
- if (length(s1) < length(s) and (length(s) < length(s2)) then writeln(s1, s, s2);
- if (length(s2) < length(s) and (length(s) < length(s1)) then writeln(s2, s, s1);
- if (length(s) < length(s2) and (length(s2) < length(s1)) then writeln(s, s2, s1);
- if (length(s) < length(s1) and (length(s1) < length(s2)) then writeln(s, s1, s2);
- readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement