Hi! I'm beginning to write some C++ programs as a hobby.
However i encounter a problem when i tried the beginner excercise "The Grading Program". No matter what i enter as my testscore, it tells me i have earned a perfect score, and why it does it is above me. Could you take a look?
#include <iostream>
using namespace std;
int main(void)
{
int testScore;
cout << "Enter your test score!" << endl;
cin >> testScore;
if (testScore = 100)
cout << "You got a perfect score!" << endl;
else if (testScore >= 90)
cout << "You got an A!" << endl;
else if (testScore >= 80)
cout << "You got a B!" << endl;
else if (testScore >= 70)
cout << "You got a C!" << endl;
else if (testScore >= 60)
cout << "You got a D!" << endl;
else if (testScore >=59)
cout << "You got an F!" << endl;