Switch Statement Vs if-else statement
Lets say I want to write a program that asks users for a score (0-100) and assign a letter grade (A-E) to the score, is it possible to use a switch statement (without having 101 cases) or if-else statement is better? . . . int score; if ((score >= 80) && (score < 90)) cout << "You've got a B\n"; else if ((score >= 70) && (score < 80)) cout << "You've got a C\n"; . . .