I have a tough time trying to break what's in here:
#include <iostream>
#include <conio.h>
#include <stdlib.h>
using namespace std;
int main ()
{
float grade;
string name;
cout << " Please input your name: " << endl;
getline(cin,name);
cout << " Please input your grade: " << endl;
cin >> grade;
if ( grade >= 96.30 && grade <= 100)
{
cout << " 1.00 " << endl;
}
else if (grade >= 92.40 && grade <= 96.29)
{
cout << "1.25" << endl;
}
else if (grade >= 88.50 && grade <= 92.39)
{
cout << "1.50" << endl;
}
else if ( grade >= 84.60 && grade <= 88.49)
{
cout << " 1.75 " << endl;
}
else if (grade >= 80.70 && grade <= 84.59)
{
cout << " 2.00 " << endl;
}
else if (grade >= 76.80 && grade <= 80.69)
{
cout << " 2.25 " << endl;
}
else if (grade >= 72.90 && grade <= 76.79)
{
cout << " 2.50 " << endl;
}
else if (grade >= 68.90 && grade <= 72.89)
{
cout << " 2.75 " << endl;
}
else if (grade >= 65.00 && grade <= 68.89)
{
cout << " 3.00 " << endl;
}
else if ( grade = 0.00 && grade <= 64.99)
{
cout << " 5.00 " << endl;
}
cout << name << "your final grade is " << grade;
}
Somehow when i enter a lower grade like 23 or 46, it shows up "0" rather than having a grade of "5.00"
Can someone help me?