Problem treasurehunt
User Mimikyu
Submission Time 2024-07-05 16:16:22
Score 0
Max Time N/A
Max Memory N/A

Compile Error

treasurehunt.cpp: In function ‘int main()’:
treasurehunt.cpp:24:9: error: expected ‘}’ before ‘else’
24 | else cout<<"No";return 0;
| ^~~~
treasurehunt.cpp:22:17: note: to match this ‘{’
22 | if(truth=false){
| ^
treasurehunt.cpp: At global scope:
treasurehunt.cpp:26:13: error: ‘a’ was not declared in this scope
26 | int pre[a];
| ^
treasurehunt.cpp:27:13: error: ‘arr’ was not declared in this scope
27 | int sum=arr[0];
| ^~~
treasurehunt.cpp:28:5: error: ‘pre’ does not name a type
28 | pre[0]=arr[0];
| ^~~
treasurehunt.cpp:29:5: error: expected unqualified-id before ‘for’
29 | for(int i=1;i<a;i++){
| ^~~
treasurehunt.cpp:29:17: error: ‘i’ does not name a type
29 | for(int i=1;i<a;i++){
| ^
treasurehunt.cpp:29:21: error: ‘i’ does not name a type