If statement that tests if a value is in range

C
if ((x >= xmin) && (x <= xmax)) {
  // something
}
Source

Also in C: