Borderou de evaluare (job #3223809)
Utilizator | Catalina Ionela Florescu catalinaionela77 | Data | 13 aprilie 2024 18:11:24 |
---|---|---|---|
Problema | Al k-lea termen Fibonacci | Status | done |
Runda | Arhiva educationala | Compilator | c-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c:7:30: error: 'DIM' undeclared here (not in a function)
7 | void multiply_matrices(int A[DIM][DIM], int B[DIM][DIM]) {
| ^~~
main.c: In function 'multiply_matrices':
main.c:8:16: error: 'DIM' undeclared (first use in this function)
8 | int result[DIM][DIM];
| ^~~
main.c:8:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:9: warning: unused variable 'result' [-Wunused-variable]
8 | int result[DIM][DIM];
| ^~~~~~
main.c: At top level:
main.c:27:30: error: 'DIM' undeclared here (not in a function)
27 | void matrix_power(int result[DIM][DIM], int k) {
| ^~~
main.c: In function 'matrix_power':
main.c:28:14: error: 'DIM' undeclared (first use in this function)
28 | int temp[DIM][DIM];
| ^~~
main.c:41:39: error: 'Z' undeclared (first use in this function)
41 | multiply_matrices(result, Z);
| ^
main.c:41:31: error: type of formal parameter 1 is incomplete
41 | multiply_matrices(result, Z);
| ^~~~~~
main.c:41:39: error: type of formal parameter 2 is incomplete
41 | multiply_matrices(result, Z);
| ^
main.c:43:27: error: type of formal parameter 1 is incomplete
43 | multiply_matrices(Z, Z);
| ^
main.c:43:30: error: type of formal parameter 2 is incomplete
43 | multiply_matrices(Z, Z);
| ^
main.c:28:9: warning: unused variable 'temp' [-Wunused-variable]
28 | int temp[DIM][DIM];
| ^~~~
main.c: In function 'main':
main.c:58:15: error: expected expression before '%' token
58 | fscanf(f1,%d,&k);
| ^
main.c:61:18: error: type of formal parameter 1 is incomplete
61 | matrix_power(z,k-1);
| ^
main.c:63:16: warning: too many arguments for format [-Wformat-extra-args]
63 | fprintf(f2,"lld",z[1][1]);
| ^~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !