How to insert degree symbol in LaTeX

To insert the degree symbol into a LaTeX document, install the gensymb package, include it in the document and use the degree symbol in math mode.

 \usepackage{gensymb}
 % ...
 Temperature is $20\degree$.