#928
AriaTriunghi
Se dau coordonatele în plan a trei puncte. Să se afișeze valoarea ariei triunghiului pe care îl formează.
Problema | AriaTriunghi | Operații I/O |
ariatriunghi.in /ariatriunghi.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54969341 | Utilizator | |
Fișier | ariatriunghi.cpp | Dimensiune | 461 B |
Data încărcării | 14 Decembrie 2024, 09:57 | Scor / rezultat | Eroare de compilare |
ariatriunghi.cpp:9:8: error: 'int y1' redeclared as different kind of symbol int x1,y1,x2,y2,x3,y3; ^ 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/iosfwd:38, from /usr/include/c++/4.8/ios:38, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from ariatriunghi.cpp:1: /usr/include/i386-linux-gnu/bits/mathcalls.h:241:1: error: previous declaration of 'double y1(double)' __MATHCALL (y1,, (_Mdouble_)); ^ ariatriunghi.cpp: In function 'int main()': ariatriunghi.cpp:18:7: error: cannot bind 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' lvalue to 'std::basic_istream<char>&&' f >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; ^ In file included from /usr/include/c++/4.8/fstream:38:0, from ariatriunghi.cpp:1: /usr/include/c++/4.8/istream:872:5: error: initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = double(double)throw ()]' operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) ^ ariatriunghi.cpp:19:34: error: invalid conversion from 'double (*)(double)throw ()' to 'int' [-fpermissive] int t = det(x1,y1,x2,y2,x3,y3); ^ ariatriunghi.cpp:11:5: error: initializing argument 2 of 'int det(int, int, int, int, int, int)' [-fpermissive] int det(int x1, int y1, int x2, int y2, int x3, int y3) ^ ariatriunghi.cpp:20:47: error: call of overloaded 'abs(double)' is ambiguous g << setprecision(1) << fixed << abs(t/2.0); ^ ariatriunghi.cpp:20:47: note: candidates are: In file included from /usr/include/c++/4.8/cstdlib:72:0, from /usr/include/c++/4.8/ext/string_conversions.h:41, from /usr/include/c++/4.8/bits/basic_string.h:2815, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from ariatriunghi.cpp:1: /usr/include/stdlib.h:775:12: note: int abs(int) extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; ^ In file included from /usr/include/c++/4.8/ext/string_conversions.h:41:0, from /usr/include/c++/4.8/bits/basic_string.h:2815, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from ariatriunghi.cpp:1: /usr/include/c++/4.8/cstdlib:174:3: note: long long int std::abs(long long int) abs(long long __x) { return __builtin_llabs (__x); } ^ /usr/include/c++/4.8/cstdlib:166:3: note: long int std::abs(long int) abs(long __i) { return __builtin_labs(__i); } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema AriaTriunghi 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ă.