int selection;
cout << “Please enter the grade you would like to receive “ << endl;
cout << “1 = C, 2 = A”;
cin >> selection;
if (selection = 1)
cout << “You’ve selected to get a C“ << endl;
else
cout << “You’ve selected to get an A“ << endl;
cout << “Please enter the grade you would like to receive “ << endl; cout << “1 = C, 2 = A”; cin >> selection; if (selection == 1) cout << “You’ve selected to get a C“ << endl; else cout << “You’ve selected to get an A“ << endl; // You have to use comparision operator instead of assignment operator in the if condition
Get Answers For Free
Most questions answered within 1 hours.