Hello, I am quite new to c++ and was wondering what was the advantage of using a switch() statement over an if() statement. Maybe this is due to my lack of understanding of the switch statement?
Here's an example. This is taken from a program that asks the user to input several score values, determines the grade based on the input, and counts how many A's, B's, etc. were inputed. The switch statement works quite well for this: