RosettaCodeData/Task/Loops-Increment-loop-index-within-loop-body/Maple/loops-increment-loop-index-within-loop-body.maple

11 lines
197 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
i := 42:
count := 0:
while(count < 42) do
2025-08-11 18:05:26 -07:00
i := i+1:
if type(i,prime) then
count := count + 1:
printf("n=%-2d %19d\n", count,i):
i := 2*i -1:
end if:
2023-07-01 11:58:00 -04:00
end do: