Borderou de evaluare (job #2393837)

Utilizator alexalghisiAlghisi Alessandro Paolo alexalghisi Data 1 aprilie 2019 09:32:24
Problema Cautare binara Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int cautbin(int)': main.cpp:9:31: error: 'n' was not declared in this scope int low=0, mid=low, high= n-1; ^ main.cpp:10:10: error: expected '(' before '{' token while{v[low] != v[high]; { ^ main.cpp:10:10: error: expected primary-expression before '{' token main.cpp:10:10: error: expected ')' before '{' token main.cpp:10:18: warning: statement has no effect [-Wunused-value] while{v[low] != v[high]; { ~~~~~~~^~~~~~~~~~ main.cpp:12:9: error: expected ')' before 'if' if (v[mid]<=val) ^~ main.cpp:19:5: error: expected primary-expression before '}' token } ^ main.cpp:25:1: error: a function-definition is not allowed here before '{' token { ^ main.cpp:58:1: error: expected '}' at end of input } ^ Non zero exit status: 1

Ceva nu functioneaza?