Problem arrayfind
User godex
Submission Time 2025-02-19 17:16:54
Score 0
Max Time N/A
Max Memory N/A

Compile Error

arrayfind.cpp: In function ‘int32_t main()’:
arrayfind.cpp:28:42: error: expected ‘;’ before ‘l’
28 | cout << "Smaller:" << ans + 1 << ", "
| ^
| ;
29 | l = 0
| ~
arrayfind.cpp:34:18: error: ‘mid’ was not declared in this scope; did you mean ‘mind’?
34 | if(a[mid] > x)
| ^~~
| mind
arrayfind.cpp:35:19: error: ‘mids’ was not declared in this scope
35 | ans = mids;
| ^~~~
arrayfind.cpp:36:17: error: ‘mid’ was not declared in this scope; did you mean ‘mind’?
36 | r = mid - 1;
| ^~~
| mind
arrayfind.cpp:37:13: error: ‘else’ without a previous ‘if’
37 | else l = mid + 1;
|