RosettaCodeData/Task/Loops-While/Asymptote/loops-while.asymptote

11 lines
335 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
int i = 1024;
while(i > 0) {
write(i);
i = i # 2; //or also i = quotient(i, 2);
}
//# Integer division; equivalent to quotient(x,y).
//Noting that the Python3 community adopted the comment symbol (//) for integer division, the
//Asymptote community decided to reciprocate and use their comment symbol for integer division!