Problem lunchbox
User UnknownCoder56
Submission Time 2023-11-23 11:55:17
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:4:6: error: ‘k’ was not declared in this scope
4 | for(k=0: i<n; k++){
| ^
lunchbox.cpp:4:19: error: expected ‘;’ before ‘)’ token
4 | for(k=0: i<n; k++){
| ^
| ;
lunchbox.cpp:5:17: error: ‘arr’ was not declared in this scope
5 | int min_num = arr[k];
| ^~~
lunchbox.cpp:6:8: error: ‘i’ was not declared in this scope
6 | for (i=k+1; i < n; i++) {
| ^
lunchbox.cpp:6:19: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
6 | for (i=k+1; i < n; i++) {
| ^
| yn
lunchbox.cpp:7:21: error: ‘min_idx’ was not declared in this scope
7 | if (arr[i] < arr[min_idx])
| ^~~~~~~
lunchbox.cpp:10:7: error: ‘min_idx’ was not declared in this scope
10 | if (mi