You compare values with operators: == tests equality, != tests inequality, < tests less than, > tests greater than, <= and >= include equality. I'll show you common mistakes: using = instead of == assigns a value instead of comparing.
Writing if (x = 5) sets x to 5, it doesn't test if x is 5. You'll see that 3 < x < 10 doesn't work in C++. You must combine comparisons with logical operators: x > 3 && x < 10 tests if x is between 3 and 10.