Problem bananasmoothie
User 583116UB
Submission Time 2024-05-04 10:59:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bananasmoothie.cpp: In function ‘int main()’:
bananasmoothie.cpp:17:14: error: expected ‘)’ before ‘}’ token
17 | if(arr[i]<0}break;
| ~ ^
| )
bananasmoothie.cpp:17:14: error: expected primary-expression before ‘}’ token
bananasmoothie.cpp:17:15: error: break statement not within loop or switch
17 | if(arr[i]<0}break;
| ^~~~~
bananasmoothie.cpp:18:15: error: ‘i’ was not declared in this scope
18 | ans+=arr[i];
| ^
bananasmoothie.cpp: At global scope:
bananasmoothie.cpp:20:4: error: ‘cout’ does not name a type
20 | cout<<ans;
| ^~~~
bananasmoothie.cpp:21:4: error: expected unqualified-id before ‘return’
21 | return 0;
| ^~~~~~
bananasmoothie.cpp:22:1: error: expected declaration before ‘}’ token
22 | }
| ^