Here are the errors I am receiving when I try to run the code:
1 2 3 4 5 6 7 8 9
Lab3P2.cpp: In function 'int main()':
Lab3P2.cpp:15: error: expected `}' before 'else'
Lab3P2.cpp: At global scope:
Lab3P2.cpp:15: error: expected unqualified-id before 'else'
Lab3P2.cpp:18: error: expected unqualified-id before 'if'
Lab3P2.cpp:20: error: expected unqualified-id before 'else'
Lab3P2.cpp:22: error: expected unqualified-id before 'if'
Lab3P2.cpp:24: error: expected unqualified-id before 'else'
Lab3P2.cpp:28: error: expected unqualified-id before 'if'
I have no idea what they mean by "expected unqualified-id before", and every time I add the } before "else" in line 15, I just get more errors.
Thanks for the help so far. I did what you guys said, and now I've gotten these errors:
1 2 3 4 5 6 7 8
Lab3P2.cpp: In function 'int main()':
Lab3P2.cpp:29: error: expected `}' before 'else'
Lab3P2.cpp: At global scope:
Lab3P2.cpp:35: error: expected unqualified-id before 'if'
Lab3P2.cpp:38: error: expected unqualified-id before 'else'
Lab3P2.cpp:40: error: expected unqualified-id before 'else'
Lab3P2.cpp:40: error: expected unqualified-id before '{' token
Lab3P2.cpp:42: error: expected declaration before '}' token
So I get a few more of the expected unqualified-id errors, but in different lines now, and I'm still not entirely sure what this is supposed to mean.