making a diagram like this picture

I want to draw a diagram like this picture in the middle of my page.

how can I do that?

I don't think you need a sledge hammer like tikzpicture for this diagram:

\documentclass{article}
\usepackage{amsmath}
\usepackage{rotating}
\newcommand\longvertarrow[1][]{\rotatebox{-90}{$\xrightarrow{\hspace{4em}}$#1}}

\begin{document}

\begin{tabular}{c}
File of program\\[-1.5ex]
\longvertarrow[~] \\
\fbox{\enspace Pre processor\enspace}\\[-1ex]
\longvertarrow \\
Source program
\end{tabular}

\end{document}


• +1 for the creativity and for showing that something can be done without tikz – Moriambar May 7 '17 at 13:40

Please always read manuals first. That helps a lot, especially since you are asking for tikz basis knowledge.

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{positioning}

\begin{document}
\begin{tikzpicture}
\node[draw=none] (a) {File of program};
\node[draw=black,below=2 of a] (b) {Pre processor};
\node[draw=none,below=2 of b] (c) {Source program};
\draw[->] (a) -- (b);
\draw[->] (b) -- (c);
\end{tikzpicture}
\end{document}