Borderou de evaluare (job #2419140)

Utilizator maraboneaMara Bonea marabonea Data 7 mai 2019 18:25:51
Problema Jocul Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:12:5: error: expected ',' or ';' before 'int' int n,i,s=0,a=0,b=0,j; ^~~ main.cpp:13:10: error: 'n' was not declared in this scope fin>>n; ^ main.cpp:15:9: error: 'i' was not declared in this scope for(i=0;i<n;i++) ^ main.cpp:17:14: error: 'v' was not declared in this scope fin>>v[i]; ^ main.cpp:18:9: error: 's' was not declared in this scope s=s+v[i]; ^ main.cpp:20:9: error: 'i' was not declared in this scope for(i=0;i<n-1;i++) ^ main.cpp:21:13: error: 'j' was not declared in this scope for(j=i+1;j<n;j++) ^ main.cpp:22:16: error: 'v' was not declared in this scope if(v[i]>v[j]) ^ main.cpp:20:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation] for(i=0;i<n-1;i++) ^~~ main.cpp:25:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for' int cont=0; ^~~ main.cpp:26:9: error: 'b' was not declared in this scope b=b+v[n-1]; ^ main.cpp:26:13: error: 'v' was not declared in this scope b=b+v[n-1]; ^ main.cpp:27:9: error: 'a' was not declared in this scope a=a+v[n-2]; ^ main.cpp:28:13: error: 'i' was not declared in this scope for(i=0;i<n-2;i++) ^ main.cpp:25:13: warning: unused variable 'cont' [-Wunused-variable] int cont=0; ^~~~ Non zero exit status: 1

Ceva nu functioneaza?