#1458
ecuatii_grad_2
Dându-se o ecuaţie de gradul 2, să se scrie un program care determină soluţiile acestei ecuaţii.
Problema | ecuatii_grad_2 | Operații I/O |
ecuatii.in /ecuatii.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #31937905 | Utilizator | |
Fișier | ecuatii_grad_2.cpp | Dimensiune | 1.63 KB |
Data încărcării | 29 Octombrie 2021, 22:14 | Scor / rezultat | Eroare de compilare |
ecuatii_grad_2.cpp: In function 'int main()': ecuatii_grad_2.cpp:8:5: error: reference to 'cin' is ambiguous cin >> ch; ^ ecuatii_grad_2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatii.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatii_grad_2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatii_grad_2.cpp:18:9: error: reference to 'cin' is ambiguous cin >> ch; ^ ecuatii_grad_2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatii.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatii_grad_2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatii_grad_2.cpp:26:9: error: reference to 'cin' is ambiguous cin >> ch; ^ ecuatii_grad_2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatii.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatii_grad_2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatii_grad_2.cpp:30:9: error: reference to 'cin' is ambiguous cin >> ch; ^ ecuatii_grad_2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatii.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatii_grad_2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatii_grad_2.cpp:37:13: error: reference to 'cin' is ambiguous cin >> ch; ^ ecuatii_grad_2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatii.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatii_grad_2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatii_grad_2.cpp:44:9: error: reference to 'cin' is ambiguous cin >> ch; ^ ecuatii_grad_2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatii.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatii_grad_2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatii_grad_2.cpp:51:13: error: reference to 'cin' is ambiguous cin >> ch; ^ ecuatii_grad_2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatii.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatii_grad_2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatii_grad_2.cpp:58:5: error: reference to 'cin' is ambiguous cin >> ch; ^ ecuatii_grad_2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatii.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatii_grad_2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatii_grad_2.cpp:60:9: error: reference to 'cin' is ambiguous cin >> c; ^ ecuatii_grad_2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatii.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatii_grad_2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatii_grad_2.cpp:62:9: error: reference to 'cin' is ambiguous cin >> c , c *= -1; ^ ecuatii_grad_2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatii.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatii_grad_2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatii_grad_2.cpp:65:9: error: reference to 'cout' is ambiguous cout << -1; ^ ecuatii_grad_2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatii.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatii_grad_2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatii_grad_2.cpp:69:9: error: reference to 'cout' is ambiguous cout << fixed << setprecision(2) << rez; ^ ecuatii_grad_2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatii.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatii_grad_2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatii_grad_2.cpp:78:9: error: reference to 'cout' is ambiguous cout << fixed << setprecision(2) << rez1 << ' ' << rez2; ^ ecuatii_grad_2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatii.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatii_grad_2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ecuatii_grad_2 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ă.