Sure, here's a simple example of how you can write an algorithm in LaTeX using the `algorithm` and `algorithmic` packages:
```latex
\documentclass{article}
\usepackage{algorithm}
\usepackage{algorithmic}
\begin{document}
\begin{algorithm}
\caption{Example Algorithm}
\begin{algorithmic}[1]
\STATE Initialize variables $a$, $b$
\STATE $a \leftarrow 0$
\STATE $b \leftarrow 1$
\FOR{$i = 1$ to $n$}
\STATE $temp \leftarrow a + b$
\STATE $a \leftarrow b$
\STATE $b \leftarrow temp$
\ENDFOR
\STATE \textbf{return} $b$
\end{algorithmic}
\end{algorithm}
\end{document}
```
This example demonstrates a simple algorithm that computes the $n$-th Fibonacci number. To compile this, you need to save the code in a `.tex` file and then use a LaTeX editor or compiler to generate the document.