On pourrait utiliser l'extension `algorithm2e` :
    \documentclass[french]{article}
    
    \usepackage{mathtools}
    \usepackage[linesnumbered,ruled,vlined]{algorithm2e}
    
    \begin{document}
    
    \begin{algorithm}
        \caption{Determinier....}
        \SetAlgoVlined
        \SetKwInOut{Input}{input}
        \SetKwInOut{Output}{output}
        \Input{N un entier...}
        \Output{nombre ...}   
        \tcc{initialisation}
    
        somme\textunderscore dividiseur $\leftarrow 0$
    
        \While{diviseur $< N$}{
          \If{N mod ...}{
            somme ...
          }
        }
        \KwRet{nombre ...}
    
        \label{alg:PoEG}
    \end{algorithm}
    
    \listofalgorithms
    
    \end{document}
<img src="/upfiles/Screen_Shot_2020-11-13_at_15.24.30.png" style="width: 100%;"/>
![alt text][1]
  [1]: https://texnique.fr/osqa/upfiles/Screen_Shot_2020-11-13_at_15.24.30_lGWhjlf.png