Farey sequence by *yuko*

read*,n;j=1;k=n;1 print'(i0"/"i0)',i,j;m=(n+j)/k*k-j;i=i*k/j+1;j=k;k=m;if(i<n)goto1;end

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page