If program just comparing integers switch statement can be used while if () statement can be used for integer as well as for non-integer values. Logic point of view, both switch () { } and if () statements have same level of cyclometic complexity.