# Write Algorithm code in IET journal template [duplicate]

i want to write Algorithm code in IET journal latex format. I am getting error as it is occured in the attached picture...Please solve this issue .. thanks in advance

this is the Algorithm code...

\begin{algorithm}[t]
\caption{Saqib Qamar}
\label{algo1}
$i \leftarrow Mod(logM,c)$\;
\If { $j \textgreater 2^i$ $\times$
$\lceil{\frac{k-0.5}{2}}\rceil$ }
{ $i \leftarrow i-2^k$\;
}
\textbf{end if}\; \textbf{return} $Add(c^k , c^j)$\;

\textbf{end Function}\;

\end{algorithm}


## marked as duplicate by Henri Menke, TeXnician, Stefan Pinnow, CarLaTeX, TroyJul 3 '17 at 6:20

This error message indicates that you have loaded a package with options more than once. Look for two instances of \usepackage[someopt]{algorithm2e} in your preamble (where someopt obviously stands in for whatever options you passed). See http://www.tex.ac.uk/FAQ-optionclash.html, which says:
If you type h at the error prompt, you should see more info about the clash.