Problem lunchbox
User ryelin
Submission Time 2023-11-09 11:49:26
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:12:22: error: expected ‘)’ before ‘;’ token
12 | sort(a, a+totalnosch; i++);
| ~ ^
| )
lunchbox.cpp:12:24: error: ‘i’ was not declared in this scope
12 | sort(a, a+totalnosch; i++);
| ^
lunchbox.cpp:13:25: error: expected ‘)’ before ‘{’ token
13 | if(lunchboxleft < a[i]{
| ~ ^
| )
lunchbox.cpp:19:6: error: expected primary-expression before ‘}’ token
19 | }
| ^
lunchbox.cpp: At global scope:
lunchbox.cpp:20:6: error: ‘cout’ does not name a type
20 | cout << ans
| ^~~~
lunchbox.cpp:21:6: error: expected declaration before ‘}’ token
21 | }
| ^