Assume that x is a char variable that has been declared and already given a value. Write an expression whose value is true if and only if x is alphanumeric, that is either a letter or a decimal digit.

LANGUAGE: Visual Basic

CHALLENGE:

Assume that x is a char variable that has been declared and already given a value. Write an expression whose value is true if and only if x is alphanumeric, that is either a letter or a decimal digit.

SOLUTION:

((x >= "A") And (x <= "Z")) Or ((x >= "a") And (x <= "z")) Or ((x >= "0") And (x <= "9"))