[Tex/LaTex] How to divide a column cell into two parts

tablestabularx

I want to create the following table header. And for that I have something like this, but it is not quite the same:

\documentclass{article}

\begin{document}

\begin{table}[h]
\begin{center}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}
\hline
Work & Prime (bits) & \# FFs & \# LUTs & \# Slices & \# DSPs & \# BRAMs & Freq. (MHz) & Latency (cc $\times 10^6$) & Total time (ms) \\ 
\hline \hline
\end{tabular}
\end{center}
\end{table}

\end{document}

First of all, as can be seen in the picture that I have linked there are two column cells that are divided into two segments, how can I achieve that? Also, you can see that in the columns that include #, the hashtag symbol is written above and the text below, how can I also achieve that?

Best Answer

The makecell package allows linebreaks in standard cells. Unrelated: don't use the center environment within table: it adds a supplementary, unwanted, vertical space. Add \centering instead.

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{multirow, makecell}

\begin{document}

\begin{table}[h]
\centering\setlength{\extrarowheight}{2pt}
\centering
\begin{tabular}{|*{10}{c|}}
\hline
 \multirowcell{3}{Work} & \multirowcell{3}{Prime\\[1ex] (bits)} & \multicolumn{5}{c|}{Area} & \multicolumn{3}{c|}{Time} \\
 \cline{3-10}
& & \makecell{\# \\FFs} & \makecell{\#\\ LUTs} & \makecell{\#\\ Slices} & \makecell{\# \\ DSPs} & \makecell{\# \\ BRAMs} & \makecell{Freq.\\ (MHz)} & \makecell{Latency \\ (cc${}\times 10^6$)} & \makecell{Total time\\ (ms)} \\
\hline \hline
\end{tabular}
\end{table}

\end{document} 

enter image description here