Problem helloworld
User godex
Submission Time 2026-02-04 16:21:16
Score 0
Max Time N/A
Max Memory N/A

Compile Error

helloworld.cpp: In function ‘int32_t main()’:
helloworld.cpp:15:5: error: expected ‘}’ before ‘else’
15 | else if (arr[i] == 2 && volume >= 1)
| ^~~~
helloworld.cpp:13:25: note: to match this ‘{’
13 | if (arr[i] == 1){
| ^
helloworld.cpp:22:4: error: expected primary-expression before ‘}’ token
22 | }
| ^
helloworld.cpp:23:32: error: lvalue required as left operand of assignment
23 | if (volume > 2 && playing = 0)
| ^
helloworld.cpp:24:7: error: no match for ‘operator>>’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘const char [4]’)
24 | cout >> "yes";
| ~~~~ ^~ ~~~~~
| | |
| | const char [4]
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:45,