Question: My error is on line 42.4; no matter if i remove or add addtional '{ }; I get the expected expression error. #include using namespace

My error is on line 42.4; no matter if i remove or add addtional '{ }"; I get the "expected expression" error.

#include

using namespace std;

int main()

{

int name, gradYear, currentYear, status, difference;

int freshman, sophmore, junior, senior;

// screen I/O

cout << "Please enter your name: ";

cin >> name;

cout << "Please enter your graduation year: ";

cin >> gradYear;

cout << "Please enter current year: ";

cin >> name;

{

if (gradYear > currentYear)

{

difference = gradYear - currentYear;

if (difference == 1)

status = senior;

else if (difference == 2)

status = junior;

else if (difference == 3)

status = sophmore;

else if (difference == 4)

status = freshman;

cout << name << ", your status: " << status <<

}

else if (gradYear <= currentYear)

cout << name << ", your status: graduated";

else (gradYear = 0);

cout << name << ", your status: not in college yet";

}

return 0;

}

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!