Problem bracketex
User JK13
Submission Time 2023-11-08 15:13:19
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 == '(' || '[' || '{' {
| ^
| (
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:21:17: error: expected ‘;’ before ‘else’
21 | cout << "Valid"
| ^
| ;
22 | else{
| ~~~~
bracketex.cpp: At global scope:
brackete