Problem bracketex
User JK13
Submission Time 2023-11-08 15:28:38
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bracketex.cpp: In function ‘int main()’:
bracketex.cpp:8:5: error: expected ‘(’ before ‘a’
8 | if a == '(' || a == '[' || a == '{' {
| ^
| (
bracketex.cpp:11:2: error: ‘else’ without a previous ‘if’
11 | else if (a == ')' ) && (s.top == '(') {
| ^~~~
bracketex.cpp:11:25: error: expected identifier before ‘(’ token
11 | else if (a == ')' ) && (s.top == '(') {
| ^
bracketex.cpp:15:23: error: expected identifier before ‘(’ token
15 | else if (a ==']') && (s.top == '[') {
| ^
bracketex.cpp:19:22: error: expected identifier before ‘(’ token
19 | else if (a=='}') && (s.top == '{')
| ^
bracketex.cpp:22:2: error: ‘else’ without a previous ‘if’
22 | else if (a == ')' || a == ']' || a == '}'){
| ^~~~
bracketex.cpp: At global scope:
bracketex.cpp:27:2: error: expected unqualified-id before ‘re