Problem binarysearch
User 6
Submission Time 2026-06-25 15:01:20
Score 0
Max Time N/A
Max Memory N/A

Compile Error

binarysearch.cpp: In function ‘int main()’:
binarysearch.cpp:20:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
20 | if(a[mid]>=a){
| ^
binarysearch.cpp:23:5: error: expected primary-expression before ‘}’ token
23 | else}
| ^
binarysearch.cpp: At global scope:
binarysearch.cpp:27:1: error: ‘cout’ does not name a type
27 | cout<<left<<'\n';
| ^~~~
binarysearch.cpp:28:1: error: expected declaration before ‘}’ token
28 | }
| ^
binarysearch.cpp:29:1: error: expected declaration before ‘}’ token
29 | }
| ^