I am writing this algorithm and this what I have as a result. The \for and \while ... doesn't appear.
\usepackage{algorithm}
\usepackage{algorithmic}
\begin{algorithm}
\caption{Calculate the exact surface of PV $A_p{v}$ }
\begin{algorithmic}
\REQUIRE $ Nmax_{wt}$\\
\FOR{$i=0:1:Nmax_{wt}$}: \\
\STATE $Npvmax = upperbound$\\
\STATE $Npvmin = 0$\\
\STATE $Pw(t) = P_w(t) \times i$ \\
\WHILE{$Npvmax - Npvmin \geq 1$}\\
\STATE $Npv = (NpvMax + NpvMin) / 2$\\
\STATE $Ppv(t) = Ppv(t) \times i$ \\
\STATE $Pre(t) = Ppv(t) + Pw(t)$\\
\STATE proceed Sizing Storage\\
\IF{$LOH(T) \leq LOH_0$ }\\
\STATE $Npvmin \leftarrow Npv / x$\\
\ELSE\\
\STATE $NpvMax \leftarrow Npv$\\
\ENDIF\\
\ENDWHILE\\
\STATE Return (Npv)
\end{algorithmic}
\end{algorithm}

