I've been trying this for so long and I can't seem to get this to work. The program keeps referring to the first condition for every input value. Does anyone know whats wrong with the code?
#include <iostream>
using namespace std;
int main()
{
int grade;
cout <<"Enter a grade between 0 and 100:";
cin>>grade;
if (0 <= grade <= 59){
cout<<"The grade for " <<grade<<" is F";
}
else if (60 <= grade <= 69){
cout<<"The grade for " <<grade<<" is D";
}
else if (70 <= grade <= 79){
cout<<"The grade for " <<grade<<" is C";
}
else if (80 <= grade <= 89){
cout<<"The grade for " <<grade<<" is B";
}
else if (90 <= grade <= 100){
cout<<"The grade for " <<grade<<" is A";
}
system("pause");
return 0;
}