[pstricks] Sieve
David Arnold
dwarnold45 at suddenlink.net
Wed May 27 19:09:38 CEST 2009
All, I came up with this:
\documentclass{article}
\usepackage{pstricks,pstricks-add}
\begin{document}
\begin{pspicture}(0,0)(10,10)
\multido{\iA=0+1}{11}{%
\psline(\iA,0)(\iA,10)}
\multido{\iA=0+1}{11}{%
\psline(0,\iA)(10,\iA)}
\multido{\rx=0.5+1,\ry=9.5+0,\n=2+1}{10}{\rput(\rx,\ry){\n}}
\multido{\rx=0.5+1,\ry=8.5+0,\n=12+1}{10}{\rput(\rx,\ry){\n}}
\multido{\rx=0.5+1,\ry=7.5+0,\n=22+1}{10}{\rput(\rx,\ry){\n}}
\multido{\rx=0.5+1,\ry=6.5+0,\n=32+1}{10}{\rput(\rx,\ry){\n}}
\multido{\rx=0.5+1,\ry=5.5+0,\n=42+1}{10}{\rput(\rx,\ry){\n}}
\multido{\rx=0.5+1,\ry=4.5+0,\n=52+1}{10}{\rput(\rx,\ry){\n}}
\multido{\rx=0.5+1,\ry=3.5+0,\n=62+1}{10}{\rput(\rx,\ry){\n}}
\multido{\rx=0.5+1,\ry=2.5+0,\n=72+1}{10}{\rput(\rx,\ry){\n}}
\multido{\rx=0.5+1,\ry=1.5+0,\n=82+1}{10}{\rput(\rx,\ry){\n}}
\multido{\rx=0.5+1,\ry=0.5+0,\n=92+1}{9}{\rput(\rx,\ry){\n}}
\end{pspicture}
\end{document}
D.
On May 27, 2009, at 9:47 AM, David Arnold wrote:
> All,
>
> I'd like to do a problem on the Sieve of Eratosphenes.
>
> This would involve framing a checkerboard, 10 rows by 10 columns,
> with the numbers 2 through 99 centered in each cell.
>
> Any suggestions?
>
> D.
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
More information about the PSTricks
mailing list