Collect and sort square numbers in ascending order from three lists: Difference between revisions

add RPL
No edit summary
(add RPL)
Line 604:
done...
</pre>
 
=={{header|RPL}}==
≪ + + OBJ→ → <span style="color:green">'''n'''</span>
≪ { } 1 <span style="color:green">'''n'''</span> '''START'''
'''IF''' DUP √ FP '''THEN''' DROP '''ELSE''' + '''END NEXT'''
SORT
≫ ≫ '<span style="color:blue">'''GETSQ'''</span>' STO
 
{ 3 4 34 25 9 12 36 56 36 } { 2 8 81 169 34 55 76 49 7 } { 75 121 75 144 35 16 46 35 } <span style="color:blue">'''GETSQ''' </span>
'''Output:'''
<span style="color:grey"> 1:</span> { 4 9 16 25 36 36 49 81 121 144 169 }
 
 
=={{header|Ruby}}==
Line 623 ⟶ 635:
<pre>[4, 9, 16, 25, 36, 36, 49, 81, 121, 144, 169]
</pre>
 
=={{header|Sidef}}==
<syntaxhighlight lang="ruby">var lists = [
1,150

edits