Borderou de evaluare (job #2902709)

Utilizator Shapka-NevedimkaSemenenco Stanislav Shapka-Nevedimka Data 16 mai 2022 18:55:22
Problema Ridicare la putere in timp logaritmic Status done
Runda Arhiva educationala Compilator c-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.c: In function 'main': main.c:23:2: error: unknown type name 'FILE' 23 | FILE* f,g; | ^~~~ main.c:1:1: note: 'FILE' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'? +++ |+#include <stdio.h> 1 | long int power(int x, int n) main.c:24:8: warning: implicit declaration of function 'fopen' [-Wimplicit-function-declaration] 24 | if((f=fopen("lgput.in","rt")!=NULL) | ^~~~~ main.c:24:8: note: 'fopen' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'? main.c:24:32: error: 'NULL' undeclared (first use in this function) 24 | if((f=fopen("lgput.in","rt")!=NULL) | ^~~~ main.c:1:1: note: 'NULL' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'? +++ |+#include <stddef.h> 1 | long int power(int x, int n) main.c:24:32: note: each undeclared identifier is reported only once for each function it appears in 24 | if((f=fopen("lgput.in","rt")!=NULL) | ^~~~ main.c:24:37: error: expected ')' before '{' token 24 | if((f=fopen("lgput.in","rt")!=NULL) | ~ ^ | ) 25 | { | ~ main.c:24:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation] 24 | if((f=fopen("lgput.in","rt")!=NULL) | ^~ main.c:34: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' 34 | } | main.c:34:1: error: expected declaration or statement at end of input 34 | } | ^ main.c:23:10: warning: unused variable 'g' [-Wunused-variable] 23 | FILE* f,g; | ^ main.c:23:8: warning: variable 'f' set but not used [-Wunused-but-set-variable] 23 | FILE* f,g; | ^ main.c:22:8: warning: unused variable 'p' [-Wunused-variable] 22 | int n,p; | ^ main.c:22:6: warning: unused variable 'n' [-Wunused-variable] 22 | int n,p; | ^ Non zero exit status: 1

Ceva nu functioneaza?