Expected Identifier Syntax Error

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include <iostream>
using namespace 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;
}
if (temp >= 60) && (temp <= 90) should be if ((temp >= 60) && (temp <= 90))
Topic archived. No new replies allowed.