How to represent tic tac toe table in Latex?

Hi all I need numbers from 1.... 8 as below in a table.

0 1 2
3 4 5
6 7 8

-
But how do I get the lines in between them? –  Vutukuri Sep 9 '12 at 0:03
what is wrong with tabular? –  mythealias Sep 9 '12 at 0:05

The probably simplest way with tabular: use | for vertical lines and \hline for horizontal lines.

\documentclass{article}
\begin{document}
\begin{tabular}{c|c|c}
1 & 2 & 3 \\
\hline
4 & 5 & 6 \\
\hline
7 & 8 & 9
\end{tabular}
\end{document}


For more complex drawings, I would use TikZ. The TikZ example gallery provides many code examples for a start.

-