Problem lunchbox
User KingKian
Submission Time 2023-09-14 08:31:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:12:36: error: expected ‘;’ before ‘)’ token
12 | for(int i = 0; i < schools, i++)
| ^
| ;
lunchbox.cpp:21:30: error: invalid types ‘int[int]’ for array subscript
21 | if (schoolboxwanted[i] + schoolboxwanted[i + 1] + schoolboxwanted[i + 2] <= lunchbox)
| ^
lunchbox.cpp:21:55: error: invalid types ‘int[int]’ for array subscript
21 | if (schoolboxwanted[i] + schoolboxwanted[i + 1] + schoolboxwanted[i + 2] <= lunchbox)
| ^
lunchbox.cpp:21:80: error: invalid types ‘int[int]’ for array subscript
21 | if (schoolboxwanted[i] + schoolboxwanted[i + 1] + schoolboxwanted[i + 2] <= lunchbox)
| ^