List comprehensions: Difference between revisions
Content added Content deleted
(→{{header|AppleScript}}: Removed two unused generic functions) |
m (→{{header|REXX}}: changed some comments, added/changed whitespace.) |
||
Line 1,717:
===vertical list===
<lang rexx>/*REXX program displays a vertical list of Pythagorean triples up to a specified number.*/
parse arg n . /*
if n=='' | n=="," then n=100 /*Not specified? Then use the default.*/
say 'Pythagorean triples (a² + b² = c², c ≤' n"):" /*display the list's title. */
$= /*assign a null to the triples list. */
#=words($)
say # 'members listed.' /*stick a fork in it, we're all done. */</lang>
{{out|output|text= when using the default input:}}
Line 1,797:
say 'Pythagorean triples (a² + b² = c², c ≤' n"):" /*display the list's title. */
$= /*assign a null to the triples list. */
#=words($) /*number of members in the list. */
say;
say;
{{out|output|text= when using the following input: <tt> 35 </tt>}}
<pre>
|