Problem arrayfind
User vadar2525
Submission Time 2026-07-13 17:49:24
Score 0
Max Time N/A
Max Memory N/A

Compile Error

arrayfind.cpp: In function ‘int main()’:
arrayfind.cpp:38:17: error: expected ‘}’ before ‘else’
38 | else if(a[mid] > k){
| ^~~~
arrayfind.cpp:37:32: note: to match this ‘{’
37 | else if(n % 2 == 1){
| ^
arrayfind.cpp:55:13: error: ‘else’ without a previous ‘if’
55 | else{
| ^~~~
arrayfind.cpp:56:17: error: ‘else’ without a previous ‘if’
56 | else if(a[mid] > k){
| ^~~~
arrayfind.cpp:56:27: error: ‘mid’ was not declared in this scope
56 | else if(a[mid] > k){
| ^~~
arrayfind.cpp:74:12: error: ‘check’ was not declared in this scope
74 | if(check){
| ^~~~~
arrayfind.cpp:75:41: error: missing template arguments before ‘<<’ token
75 | cout << "Smaller: "