85

How do I write not equal to sign (equivalent of != in C) in Latex pseudocode.

2
  • 19
    Do you mean $\neq$?
    – Daniel Fischer
    Jul 18, 2012 at 9:23
  • 2
    Or, what doesn't work for you using != Jul 18, 2012 at 9:38

3 Answers 3

129

Not equal can be written as:

\neq
1
4

If you want a literal != in a pseudocode listing, you can use \mathrel{\mathtt{!=}}. You could also use ≠ from the monospace font.

Unicode also has the symbol ⍯ from APL. It’s U+236F, and you can use it in LuaLaTeX or XeLaTeX.

1

$\neg$ is - and $\not=$ is the equal sign with the slash through the center

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy