✏️ Explanatory Question
Question:
Rewrite the following fragment using switch:
if (ch == 'E') eastern++;
if (ch == 'W') western++;
if (ch == 'N') northern++;
if (ch == 'S') southern++;
else unknown++;