I am trying for a if-else statement inside a for loop. This my code and there is some problem with inner for loop and if-else statement. Code is as follows
\begin{algorithm}
\caption{Euclid’s algorithm}
\label{alg:euclid}
\begin{algorithmic}[1]
\State U: a set of authentic users
\State T: a set containing trustor and trustee information
\Procedure{DepthDetection}{$T_t_h, U_i$}
% \State $r\gets a\bmod b$
\State $T_u_i \gets list\ of\ trustee\ taking\ U_i\ as\ trustor$
\State $I_u_i \gets list\ of\ items\ rated\ by\ U_i$
\State Build ${U_i}'s\ trust\ network\ using\ $T_t_h$
\For{each item $i$ in $I_u_i$ }
\State $NU_u_i \gets list\ of\ users\ who\ rated\ I_i$
\For{each user $u$ in $NU_u_i$ }
\IF{$u$ is in $T_u_i$}
\STATE use the rating and trust of $u$ for prediction of rating
\ENDIF
\EndFor
\EndFor
\State \textbf{return} $L$
\EndProcedure
\end{algorithmic}\end{algorithm}
As you can see there is a continuation of if condition and statements after the inner loop. I want that to be in nested format.
.log
file.