TransWikia.com

In algorithmic Vertical loop/block lines not coming properly

TeX - LaTeX Asked by b.phani Krishna on April 19, 2021

In algorithmic Vertical loop/block lines not coming properly

In thesis writing (book), Some algorithms are perfectly shown the order of loops (vertical loop blocks). But one algorithm not showing well. Showing vertical loop line in inappropriate positions.

begin{algorithm}[]
    $X gets bigcup_{i=1}^{N}{x_{i}}$
    begin{algorithmic}[1]
        For{$i gets 1$ to $N$}
         State $temp gets x_{i}^{2}$
         State $temp1 gets x_{i}^{2}$
         State $Eng gets Eng+x_{i}^{2}$
         If{$temp < 1.0e-04~and~temp!=0$}
          While{$temp geq 1.0e-04$}{
            State $temp gets temptimes 100 $
            EndWhile}
        EndIf

State $LEng gets LEng+log(temp1)$
EndFor
        State Return $Eng,EEng,LEng$ 
    end{algorithmic}

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP