-1

enter image description here

I need to draw above image. I tried but I am able draw only fixed length tables.

Werner
  • 603,163

1 Answers1

1

Use a tabular:

enter image description here

\documentclass{article}

\newcommand{\mc}{\multicolumn}% Some shorthand...

\begin{document}

\begingroup
\renewcommand{\arraystretch}{1.5}% http://tex.stackexchange.com/q/31672/5764
\begin{tabular}{ *{5}{|c} | }
  \cline{4-4}
  \mc{3}{c|}{} & 6 & \mc{1}{c}{} \\
  \cline{1-1}\cline{3-4}
  5 & & 3 & 8 & \mc{1}{c}{} \\
  \hline
  1 & 7 & 10 & 4 & 11 \\
  \hline
  \mc{1}{c}{9} & \mc{1}{c}{1} & \mc{1}{c}{9} & \mc{1}{c}{8} & \mc{1}{c}{5}
\end{tabular}
\endgroup

\end{document}
Werner
  • 603,163