/**************************
Basic input/output
Basic training
Grading Program By NoobLess
****************************/
#include <iostream>
using namespace std;
int main()
{
int grade;
cout << " Please enter student grade: \n";
cout << " Grade must be 100: 90: 89: 80: 79: 70: 69: 60: 59: 0:\n";
cin >> grade;
if(grade == 100)
{
cout << " You got A+"<<endl;
}
else if(grade == 90)
{
cout<< " You got A- "<<endl;
}
else if(grade == 89)
{
cout << " You got B+ "<<endl;
}
else if(grade == 80)
{
cout << " You got a B-" << endl;
}
else if(grade == 79)
{
cout << " You got a C+ " <<endl;
}
else if(grade ==70)
{
cout << " You got a C " <<endl;
}
else (grade == 69)
{
cout << "You got a D+ " <<endl;
}
else if(grade == 60)
{
cout << " You got a D " <<endl;
}
else if(grade == 59)
{
cout << " You got a F"<<endl;
}
else if(grade == 0)
{
cout << " You completed failed"<<endl;
}
cin.get();
return 0;
}
// When I try to run my code I get error
1>------ Rebuild All started: Project: ConsoleAppBasic, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'ConsoleAppBasic', configuration 'Debug|Win32'
1>Compiling...
1>main.cpp
1>c:\users\lydia\documents\visual studio 2008\projects\consoleappbasic\consoleappbasic\main.cpp(43) : error C2143: syntax error : missing ';' before '{'
1>c:\users\lydia\documents\visual studio 2008\projects\consoleappbasic\consoleappbasic\main.cpp(46) : error C2181: illegal else without matching if
1>Build log was saved at "file://c:\Users\LYDIA\Documents\Visual Studio 2008\Projects\ConsoleAppBasic\ConsoleAppBasic\Debug\BuildLog.htm"
1>ConsoleAppBasic - 2 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========