Steady squares: Difference between revisions
Content added Content deleted
(Steady squares in Gambas) |
|||
Line 2,117: | Line 2,117: | ||
== {{header|Ruby}} == |
== {{header|Ruby}} == |
||
<syntaxhighlight lang="ruby">p (0..10_000).select{|n| (n*n).to_s.end_with? n.to_s }</syntaxhighlight> |
<syntaxhighlight lang="ruby">p (0..10_000).select{|n| (n*n).to_s.end_with? n.to_s } </syntaxhighlight> |
||
{{out}} |
{{out}} |
||
<pre>[0, 1, 5, 6, 25, 76, 376, 625, 9376] |
<pre>[0, 1, 5, 6, 25, 76, 376, 625, 9376] |