Borderou de evaluare (job #2711176)
Utilizator | Data | 23 februarie 2021 18:50:48 | |
---|---|---|---|
Problema | A+B | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:9:4: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for (i=1; i<=n; i++)
^~~
main.cpp:11:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
c=fabs(x[1],x[n]);
^
main.cpp:11:21: error: no matching function for call to 'fabs(double&, double&)'
c=fabs(x[1],x[n]);
^
In file included from /usr/include/features.h:367:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h:507,
from /usr/include/c++/6/iostream:38,
from main.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:181:1: note: candidate: double fabs(double)
__MATHCALLX (fabs,, (_Mdouble_ __x), (__const__));
^
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:181:1: note: candidate expects 1 argument, 2 provided
In file included from main.cpp:2:0:
/usr/include/c++/6/cmath:276:5: note: candidate: template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::fabs(_Tp)
fabs(_Tp __x)
^~~~
/usr/include/c++/6/cmath:276:5: note: template argument deduction/substitution failed:
main.cpp:11:21: note: candidate expects 1 argument, 2 provided
c=fabs(x[1],x[n]);
^
In file included from main.cpp:2:0:
/usr/include/c++/6/cmath:268:3: note: candidate: constexpr long double std::fabs(long double)
fabs(long double __x)
^~~~
/usr/include/c++/6/cmath:268:3: note: candidate expects 1 argument, 2 provided
/usr/include/c++/6/cmath:264:3: note: candidate: constexpr float std::fabs(float)
fabs(float __x)
^~~~
/usr/include/c++/6/cmath:264:3: note: candidate expects 1 argument, 2 provided
main.cpp:16:4: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for (i=2; i<=n-1; i++)
^~~
main.cpp:19:7: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
cout<<nr;
^~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !