Iam writing a pseudocode using the algorithm and algorithmic packages. The IF statement which in my case is a bit lenghty is going to the newline and not giving proper indentation. Iam using the two column format for writing the paper. Iam giving the code snippet.
Code: Select all
\usepackage{algorithm}
\usepackage{algorithmic}
\begin{document}
\begin{algorithm}
\caption{Algo 1}
\label{alg}
\begin{algorithmic}[1]
\STATE Initialize $iFinalMM \leftarrow 0$,
\FOR{$i=1$ to $A/2$}
\FOR{$i=1$ to $B/2$}
\IF {$iTestAC\neq0 \&\& iTestBC\neq0 \&\& iTestCA\neq0$}
\STATE $iFinalMM \leftarrow 1$
\ENDIF
\ENDFOR
\ENDFOR
\end{algorithmic}
\end{algorithm}
\end{document}
Thanks in advance
regards
manish