I am trying to write some pseudocode using verbatim. The problem is, I can't get it write the right symbols. Here's my code:
\begin{verbatim}
S= $\emptyset$
while ((not ottimo(S) ) and (C \ne $\emptyset$))
x = seleziona(C)
C = C – {x}
if (ammissibile(S U {x}))
S = S U {x}
if (ottimo(S))
return S
else
return $\emptyset$
\end{verbatim}
If I write $\emptyset$
shows it exactly as it is written, but if I use Ø
it returns error.
How can I fix it?
ps. it does the same with every other symbol, like not equal, ...