Borderou de evaluare (job #2365501)
Utilizator | Data | 4 martie 2019 14:09:58 | |
---|---|---|---|
Problema | Algoritmul lui Euclid | Status | done |
Runda | Arhiva educationala | Compilator | c-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'gcd':
main.c:6:28: error: lvalue required as left operand of assignment
a > b ? a -= b : b -= a;
^~
main.c: In function 'main':
main.c:18:20: warning: passing argument 2 of 'fscanf' from incompatible pointer type [-Wincompatible-pointer-types]
fscanf(inFile, &T);
^
In file included from /usr/include/features.h:367:0,
from /usr/include/stdio.h:27,
from main.c:1:
/usr/include/stdio.h:443:12: note: expected 'const char * restrict' but argument is of type 'int *'
extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
^
main.c:18:20: warning: format not a string literal and no format arguments [-Wformat-security]
fscanf(inFile, &T);
^~
main.c:24:9: error: 'd' undeclared (first use in this function)
d = gcd(a, b);
^
main.c:24:9: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'gcd':
main.c:8:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
main.c: In function 'main':
main.c:18:5: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result]
fscanf(inFile, &T);
^~~~~~~~~~~~~~~~~~
main.c:21:9: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result]
fscanf(inFile, "%d", &a);
^~~~~~~~~~~~~~~~~~~~~~~~
main.c:22:9: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result]
fscanf(inFile, "%d", &b);
^~~~~~~~~~~~~~~~~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !