Borderou de evaluare (job #2228981)
Utilizator | Data | 5 august 2018 16:11:21 | |
---|---|---|---|
Problema | Algoritmul lui Gauss | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int main()’:
user.cpp:22:33: warning: format ‘%lf’ expects argument of type ‘double*’, but argument 2 has type ‘long double*’ [-Wformat=]
scanf("%lf",&a[i][j]);
^
user.cpp:24:22: warning: format ‘%lf’ expects argument of type ‘double*’, but argument 2 has type ‘long double*’ [-Wformat=]
scanf("%lf",&b[i]);
^
user.cpp:27:18: warning: left operand of comma operator has no effect [-Wunused-value]
for(i=1,j=1;i<=n,j<=m;i++,j--) {
~^~~
user.cpp:52:27: error: call of overloaded ‘abs(long double&)’ is ambiguous
if(abs(a[i][j])>=eps)
^
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/c++/6/bits/stl_algo.h:59,
from /usr/include/c++/6/algorithm:62,
from user.cpp:2:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
from /usr/include/c++/6/algorithm:62,
from user.cpp:2:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
user.cpp:55:27: error: call of overloaded ‘abs(long double&)’ is ambiguous
if(j>m && abs(b[i])>=eps) {
^
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/c++/6/bits/stl_algo.h:59,
from /usr/include/c++/6/algorithm:62,
from user.cpp:2:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
from /usr/include/c++/6/algorithm:62,
from user.cpp:2:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
user.cpp:65:29: warning: format ‘%lf’ expects argument of type ‘double’, but argument 2 has type ‘long double’ [-Wformat=]
printf("%.12lf",x[j]);
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !