Remove duplicate elements: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 2,384: | Line 2,384: | ||
2 7 |
2 7 |
||
</pre> |
</pre> |
||
=={{header|Ring}}== |
|||
<lang ring> |
|||
list = ["Now", "is", "the", "time", "for", "all", "good", "men", "to", "come", "to", "the", "aid", "of", "the", "party."] |
|||
for i = 1 to len(list) |
|||
for j = i + 1 to len(list) |
|||
if list[i] = list[j] del(list, j) ok |
|||
next |
|||
next |
|||
for n = 1 to len(list) |
|||
see list[n] + " " |
|||
next |
|||
see nl |
|||
</lang> |
|||
Output: |
|||
<pre> |
|||
Now is the time for all good men to come aid of party. |
|||
</pre> |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |