#3817
ArieTrapez
Se dau lungimile laturilor unui trapez ABCD
cu AB||CD
. Aflati aria acestuia.
matematică
Problema | ArieTrapez | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54845150 | Utilizator | |
Fișier | arietrapez.cpp | Dimensiune | 460 B |
Data încărcării | 10 Decembrie 2024, 10:29 | Scor / rezultat | Eroare de compilare |
arietrapez.cpp: In function 'int main()': arietrapez.cpp:13:50: error: no matching function for call to 'pow(double)' h = sqrt(pow(AD, 2) - pow((AB - CD) / 2.0)); ^ arietrapez.cpp:13:50: note: candidates are: In file included from /usr/include/features.h:374:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:426, from /usr/include/c++/4.8/iostream:38, from arietrapez.cpp:2: /usr/include/i386-linux-gnu/bits/mathcalls.h:153:1: note: double pow(double, double) __MATHCALL (pow,, (_Mdouble_ __x, _Mdouble_ __y)); ^ /usr/include/i386-linux-gnu/bits/mathcalls.h:153:1: note: candidate expects 2 arguments, 1 provided In file included from arietrapez.cpp:3:0: /usr/include/c++/4.8/cmath:434:5: note: template<class _Tp, class _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type std::pow(_Tp, _Up) pow(_Tp __x, _Up __y) ^ /usr/include/c++/4.8/cmath:434:5: note: template argument deduction/substitution failed: arietrapez.cpp:13:50: note: candidate expects 2 arguments, 1 provided h = sqrt(pow(AD, 2) - pow((AB - CD) / 2.0)); ^ In file included from arietrapez.cpp:3:0: /usr/include/c++/4.8/cmath:411:3: note: constexpr long double std::pow(long double, long double) pow(long double __x, long double __y) ^ /usr/include/c++/4.8/cmath:411:3: note: candidate expects 2 arguments, 1 provided /usr/include/c++/4.8/cmath:407:3: note: constexpr float std::pow(float, float) pow(float __x, float __y) ^ /usr/include/c++/4.8/cmath:407:3: note: candidate expects 2 arguments, 1 provided
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ArieTrapez face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.