C++ switch statement beginner exercise
Can anyone please explain to me where is the error? I can't really understandđ This is the exercise: "Write a program that allows the user to enter the grade scored in a programming class (0-100). Modify the program so that it will notify the user of their letter grade using switch statement. 0-59 F 60-69 D 70-79 C 80-89 B 90-100 A." And this is my code: #include <iostream> using namespace std; int main() { int grade=0; cin>>grade; switch (grade) { case 50&&59: cout<<"You've got a F"; break; case 60&& 69: cout<<"You've got a D"; break; case 70&&79: cout<<"Yuo've got a C"; break; case 80&&89: cout<<"Yuo've got a B"; break; case 90&&99: cout<<"Yuo've got an A"; break; } return 0; }