Problem moneychanger
User briyanii
Submission Time 2024-01-22 22:23:22
Score 0
Max Time N/A
Max Memory N/A

Compile Error

moneychanger.cpp: In function ‘int main()’:
moneychanger.cpp:8:2: error: expected initializer before ‘cin’
8 | cin >> beancount >> beans;
| ^~~
moneychanger.cpp:10:10: error: ‘beanlist’ was not declared in this scope; did you mean ‘beans’?
10 | cin >> beanlist[i];
| ^~~~~~~~
| beans
moneychanger.cpp:14:8: error: ‘beanlist’ was not declared in this scope; did you mean ‘beans’?
14 | if (beanlist[j] <= beancount) {
| ^~~~~~~~
| beans
moneychanger.cpp:16:15: error: expected ‘;’ before ‘}’ token
16 | count += 1
| ^
| ;
17 | }
| ~