Here is the code. Even I have used the command \nonumber still I can see the equation number
\begin{document}
\begin{algorithm}
\DontPrintSemicolon % Some LaTeX compilers require you to use \dontprintsemicolon instead
\KwIn{$A,B,C$ }
\KwOut{Optimal value for $x_{2}$ and $\lambda$}
Initialisation: \textit{$\lambda(0)=2\pi/3$ and $\epsilon=10^{-6}$}\\
i=0\\
Compute $x_{2}$
\begin{equation}
x_{2}(i)=\frac {A^2B^2}{\sin\lambda(i)\sqrt{A+B-2C+2\sec\lambda(i)}} \nonumber
\end{equation}\\
Update $\lambda$
\begin{equation}
\lambda(i+1)=\arctan\bigg( -\frac{A}{2Bx_{2}-1} \bigg) \nonumber
\end{equation}\\
i=i+1\\
repeat till $|\lambda(i+1)-\lambda(i) |<\epsilon$
\caption{algo}
\label{algo:max}
\end{algorithm}
\end{document}

