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

11 lines
170 B
Text
Raw Permalink Normal View History

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