Borderou de evaluare (job #2241386)

Utilizator stefanut999Paul Colta stefanut999 Data 15 septembrie 2018 18:02:58
Problema Maxd Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int nr_div(int)’: user.cpp:10:5: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation] while(x%2==0) ^~~~~ user.cpp:12:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘while’ x=x/2; ^ user.cpp:8:9: warning: unused variable ‘i’ [-Wunused-variable] int i,k=2,n=sqrt(x); ^ user.cpp:8:11: warning: unused variable ‘k’ [-Wunused-variable] int i,k=2,n=sqrt(x); ^ user.cpp:8:15: warning: unused variable ‘n’ [-Wunused-variable] int i,k=2,n=sqrt(x); ^ user.cpp:9:9: warning: unused variable ‘factors’ [-Wunused-variable] int factors=1,exponen=0; ^~~~~~~ user.cpp:13:5: warning: no return statement in function returning non-void [-Wreturn-type] } ^ user.cpp: At global scope: user.cpp:14:5: error: ‘factors’ does not name a type factors= factors*(exponen+1); ^~~~~~~ user.cpp:15:5: error: ‘exponen’ does not name a type exponen=0; ^~~~~~~ user.cpp:16:20: error: ‘x’ was not declared in this scope int original_x=x; ^ user.cpp:17:5: error: expected unqualified-id before ‘for’ for(i=3;n>1 && i<=sqrt(n);i+=2) ^~~ user.cpp:17:13: error: ‘n’ does not name a type for(i=3;n>1 && i<=sqrt(n);i+=2) ^ user.cpp:17:31: error: ‘i’ does not name a type for(i=3;n>1 && i<=sqrt(n);i+=2) ^ user.cpp:27:2: error: expected unqualified-id before ‘return’ return factors; ^~~~~~ user.cpp:28:1: error: expected declaration before ‘}’ token } ^

Ceva nu functioneaza?