Loops/Increment loop index within loop body: Difference between revisions
Loops/Increment loop index within loop body (view source)
Revision as of 20:09, 28 June 2020
, 3 years ago→{{header|Phix}}: is_prime() now a builtin
ReeceGoding (talk | contribs) (Added R solution) |
m (→{{header|Phix}}: is_prime() now a builtin) |
||
Line 3,101:
=={{header|Phix}}==
Phix does not allow for loop variables to be modified, so we must use a while loop and manual increment for this sort of thing
<lang Phix>atom i=42, n=1
while n<=42 do
if
printf(1,"n = %-2d %,19d\n", {n, i})
n += 1
|