Borderou de evaluare (job #2621854)

Utilizator BulaceanuAlexandraBulaceanu Alexandra-Irina BulaceanuAlexandra Data 30 mai 2020 21:06:49
Problema Cautare binara Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:10:11: error: uninitialized const 'n' [-fpermissive] const int n; ^ main.cpp:12:1: error: 'fin' does not name a type fin>>n; ^~~ main.cpp:14:8: error: array bound is not an integer constant before ']' token int v[n]; ^ main.cpp: In function 'int cautareBinara0(int, int, int)': main.cpp:25:13: error: 'v' was not declared in this scope if (v[mid] <= val) ^ main.cpp:37:9: error: 'v' was not declared in this scope if (v[mid] > val) mid --; ^ main.cpp:39:9: error: 'v' was not declared in this scope if (v[mid] == val) ^ main.cpp: In function 'int cautareBinara1(int, int, int)': main.cpp:56:13: error: 'v' was not declared in this scope if (v[mid] <= val) ^ main.cpp:68:9: error: 'v' was not declared in this scope if (v[mid] > val) ^ main.cpp: In function 'int cautareBinara2(int, int, int)': main.cpp:86:13: error: 'v' was not declared in this scope if (v[mid] < val) ^ main.cpp:98:9: error: 'v' was not declared in this scope if (v[mid] < val) ^ main.cpp: In function 'int main()': main.cpp:112:14: error: 'v' was not declared in this scope fin>>v[i]; ^ Non zero exit status: 1

Ceva nu functioneaza?