Your problem is with your assignment operators...You are not using the correct syntax.
The "=" works differently than it does in your math class. Whatever is on the right of the operator passes its information to the left. What ever variable that is on the left of the operator will take the value of whats on the right..
else
{
if ((sy % 4) == 0)
{
i = sy;
}
elseif (sy % 4 == 1)
{
i = sy +3;
}
elseif (sy % 4 == 2)
{
i = sy+2;
}
else (sy % 4 == 3);
{
i = sy+1;
}
cout << i << endl;
}
return 0;
}
**Try to make your variables more explicit...Be a little bit more descriptive in your naming conventions when declaring a variable. What does sy and ey stand for?
***Also the structure of your if else statements are not correct....well just very sloppy looking :/