#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
float score; //Score
float grade; //Grade
// read in total score
cout << endl;
cout << "Enter total score (float, must be <= 100) : ";
cin >> score;
[color=#FF0000]if (score >= 85);
grade = 'A';
else
if (score >= 75);
grade = 'B';
else
if (score >= 65);
grade = 'C';
else
if (score >= 55);
grade = 'D';
else
grade = 'F';
if // score >= 55;
if // score >= 65;
if // score >= 75;
if // score >= 85;[/color]
// display the result
;cout << endl;
cout << "Your grade for CMIS 102 is: " << grade << endl;
return (0); // terminate with success
}
Here are my errors.
warning C4390: ';' : empty controlled statement found; is this the intent?
error C2181: illegal else without matching if
warning C4390: ';' : empty controlled statement found; is this the intent?
error C2181: illegal else without matching if
warning C4390: ';' : empty controlled statement found; is this the intent?
error C2181: illegal else without matching if
error C2059: syntax error : 'if'

New Topic/Question
Reply




MultiQuote






|