expected expression in C++?

You problem is this:

if (cos == sin)
    cout << "\n";
    for (int x = 0; x < numRows/2; x++) {
        for (int y = numRows/2; y >0; y--) {
            cout << "*";
        }
    }

Here only the cout is part of the if statement. The loop is not. You need to add braces around the whole block.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)