I am new to programming and need help figuring out the error in my program. I cant find the error. I've tried stepping away for a while then coming back but still cant find it.
error code- fatal error C1075: end of file found before the left brace '{' at 'g:\lab5_ortega\lab5_ortega\lab5_jose_ortega.cpp(49)' was matched
#include <cmath>
#include <iostream>
int mian()
{
usingnamespace std;
//variables needed
//int a;
//int b;
//int c;
//int d;
//int f;
int grade;
//here user will input numberical grade 0-100 to get a,b,c,d, or f
cout << "Please enter your numberical grade between 0-100: " << endl;
cin >> grade;
//here is where i declare the value of the variables
if (grade < 60) // if they enter less than 60 they have an f
{
cout << "Your grade is an F " << "You failed! " << endl << endl;
}
else
{
if (grade < 70)
{
cout << "Your Grade is a D " << "You got some credit! "<< endl << endl;
}
else
{
if (grade < 80)
{
cout << "Your grade is a C " << "You just made it! "<< endl << endl;
}
else
{
if (grade < 90)
{
cout << "Your grade is a B " << "You Passed! " << endl << endl;
}
else
{
if (grade < 100)
{
cout << "Your grade is an A " << "Great Job! You Passed! " << endl << endl;
}
return 0;
}
First of all it's spelled "main" not "mian" (Unless you are of pre-columnbian origin.)
You need to match your curly braces. I would suggest that you put a comment after each right-curly brace to document with which left-curly brace it belongs.