Problem lunchbox
User Dam
Submission Time 2023-01-17 13:46:11
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:26:23: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
26 | for(int k=0;k<2;k++){cin>>list[i];}
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:75,
from lunchbox.cpp:15:
/usr/include/c++/9/iostream:60:18: note: ‘std::cin’ declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
lunchbox.cpp:26:33: error: ‘i’ was not declared in this scope
26 | for(int k=0;k<2;k++){cin>>list[i];}
| ^