Larger than and less than in C switch statement December 14, 2023 by Tarik There is no clean way to solve this with switch, as cases need to be integral types. Have a look at if-else if-else.