Hello, I am entirely new to C++, and in this code I cannot figure out what exactly the problem is. My IDE is Xcode, and it has signified the error "Expected identifier" in the lines of the code that I have signified below. I have checked and rechecked the code, yet I am unable to see why it should not compile. I would greatly appreciate the eyes of someone more experienced taking a quick look at this. Also, I realize that there are other problems with the code that I haven't figured out yet. I will address those next. Thank you.
#include <iostream>
usingnamespace std;
int main()
{
int temp;
bool summer;
cout << "What is the temperature?\n";
cin >> temp;
cout << "Is it summer? Input true or false.\n";
cin >> summer;
if (summer == false)
{
// The following line is the first problem line according to Xcode.
if (temp >= 60) && (temp <= 90)
cout << "The squirrels are playing";
else
cout << "The squirrels are not playing";
}
else
{
// The following line is the second problem line.
if (temp >= 60) && (temp <= 100)
cout << "The squirrels are playing";
else
cout << "The squirrels are not playing";
}
return 0;
}