Reverse words in a string: Difference between revisions
Content added Content deleted
(Added Algol 68) |
m (added whitespace before the TOC, added an ;Example (bold) header, made a verb agree in number.) |
||
Line 1: | Line 1: | ||
{{task}} |
{{task}} |
||
The task is to reverse the order of all tokens in each of a number of strings and display the result; the order of characters within a token should not be modified. |
The task is to reverse the order of all tokens in each of a number of strings and display the result; the order of characters within a token should not be modified. |
||
⚫ | |||
⚫ | |||
;Example: |
|||
⚫ | |||
⚫ | |||
You may assume that there are no significant non-visible characters in the input. Multiple or superfluous spaces may be compressed into a single space. |
You may assume that there are no significant non-visible characters in the input. Multiple or superfluous spaces may be compressed into a single space. |
||
Line 12: | Line 15: | ||
(You can consider the ten strings as ten lines, and the tokens as words.) |
(You can consider the ten strings as ten lines, and the tokens as words.) |
||
;Input data |
;Input data |
||
Line 33: | Line 37: | ||
;Cf. |
;Cf. |
||
* [[Phrase reversals]] |
* [[Phrase reversals]] |
||
<br><br> |
|||
=={{header|Ada}}== |
=={{header|Ada}}== |