Borderou de evaluare (job #2281904)
Utilizator | Data | 12 noiembrie 2018 22:06:09 | |
---|---|---|---|
Problema | Algoritmul lui Euclid | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int euclid(int, int)':
main.cpp:10:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if(b==0)
^~
main.cpp:11:14: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
return a;freopen("euclid2.in", "r", stdin);
^~~~~~~
main.cpp:14:18: error: 'T' was not declared in this scope
scanf("%d", &T);
^
main.cpp:17:25: error: 'A' was not declared in this scope
scanf("%d %d", &A, &B);
^
main.cpp:17:29: error: 'B' was not declared in this scope
scanf("%d %d", &A, &B);
^
main.cpp:18:32: error: 'gcd' was not declared in this scope
printf("%d\n", gcd(A, B));
^
main.cpp: In function 'int main()':
main.cpp:27:18: error: 't' was not declared in this scope
scanf("%d", &t);
^
main.cpp: In function 'int euclid(int, int)':
main.cpp:11:47: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
return a;freopen("euclid2.in", "r", stdin);
^
main.cpp:12:40: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("euclid2.out", "w", stdout);
^
main.cpp: In function 'int main()':
main.cpp:24:38: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("euclid2.in", "r", stdin);
^
main.cpp:25:40: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("euclid2.out", "w", stdout);
^
main.cpp:30:31: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &a, &b);
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !