I made a table in Latex using the following code:
\begin{table}[H]
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}
\hline
\multicolumn{1}{P{270}{2cm}}{Distance to target} &
\multicolumn{1}{P{270}{2cm}}{Angle arrow 1} &
\multicolumn{1}{P{270}{2cm}}{Angle arrow 2} &
\multicolumn{1}{P{270}{2cm}}{Angle arrow 3} &
\multicolumn{1}{P{270}{2cm}}{Angle arrow 4} &
\multicolumn{1}{P{270}{2cm}}{Angle arrow 5} &
\multicolumn{1}{P{270}{2cm}}{Angle arrow 6} &
\multicolumn{1}{P{270}{2cm}}{Average angle} &
\multicolumn{1}{P{270}{2.1cm}}{Predicted angle}\\
\hline
40 & 6$^{\circ}$ & 6$^{\circ}$ & 6$^{\circ}$ & 6$^{\circ}$ & 7$^{\circ}$ & 7$^{\circ}$ & 6.33$^{\circ}$ & 4.67$^{\circ}$ \\ \hline
50 & 8$^{\circ}$ & 8$^{\circ}$ & 9$^{\circ}$ & 8$^{\circ}$ & 9$^{\circ}$ & 8$^{\circ}$ & 8.33$^{\circ}$ & 6.56$^{\circ}$ \\ \hline
60 & 10$^{\circ}$ & 11$^{\circ}$ & 11$^{\circ}$ & 9$^{\circ}$ & 10$^{\circ}$ & 11$^{\circ}$ & 11.33$^{\circ}$ & 7.50$^{\circ}$ \\ \hline
\end{tabular}
\caption{X}
\label{table1}
\end{table}
This code gave me the following table:
All my cells have a border, except for the top row. How do I get borders around the cells in the top row?
P
column type is defined.\documentclass
and end\end{document}
.