Borderou de evaluare (job #2223222)

Utilizator Andrei-27Arhire Andrei Andrei-27 Data 19 iulie 2018 13:44:48
Problema Ridicare la putere in timp logaritmic Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘long int putere(long int, long int)’: user.cpp:6:38: error: expected ‘;’ before ‘n’ if(p%2==1) return (n*putere(n*n,p/2))n%1999999973; ^ user.cpp:6:1: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if(p%2==1) return (n*putere(n*n,p/2))n%1999999973; ^~ user.cpp:6:38: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ if(p%2==1) return (n*putere(n*n,p/2))n%1999999973; ^ user.cpp:6:39: warning: statement has no effect [-Wunused-value] if(p%2==1) return (n*putere(n*n,p/2))n%1999999973; ~^~~~~~~~~~~ user.cpp:7:34: error: expected ‘;’ before ‘n’ if(p%2==0) return putere(n*n,p/2)n%1999999973;} ^ user.cpp:7:1: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if(p%2==0) return putere(n*n,p/2)n%1999999973;} ^~ user.cpp:7:34: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ if(p%2==0) return putere(n*n,p/2)n%1999999973;} ^ user.cpp:7:35: warning: statement has no effect [-Wunused-value] if(p%2==0) return putere(n*n,p/2)n%1999999973;} ~^~~~~~~~~~~ user.cpp:7:47: warning: control reaches end of non-void function [-Wreturn-type] if(p%2==0) return putere(n*n,p/2)n%1999999973;} ^

Ceva nu functioneaza?