#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 | #54398284 | Utilizator | |
Fișier | ecuatii_grad_2.cpp | Dimensiune | 1.10 KB |
Data încărcării | 27 Noiembrie 2024, 16:03 | Scor / rezultat | Eroare de compilare |
ecuatii_grad_2.cpp:7:14: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin ("ecuatii.in"); ^ ecuatii_grad_2.cpp:8:15: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout ("ecuatii.out"); ^ ecuatii_grad_2.cpp: In function 'int main()': ecuatii_grad_2.cpp:21:5: error: reference to 'cin' is ambiguous cin.get(s,256); ^ ecuatii_grad_2.cpp:7:10: note: candidates are: <typeprefixerror>cin ifstream cin ("ecuatii.in"); ^ In file included from ecuatii_grad_2.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatii_grad_2.cpp:45:9: error: reference to 'cout' is ambiguous cout<<-1; ^ ecuatii_grad_2.cpp:8:10: note: candidates are: <typeprefixerror>cout ofstream cout ("ecuatii.out"); ^ In file included from ecuatii_grad_2.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatii_grad_2.cpp:50:10: error: reference to 'cout' is ambiguous cout<<fixed<<setprecision(2)<<x; ^ ecuatii_grad_2.cpp:8:10: note: candidates are: <typeprefixerror>cout ofstream cout ("ecuatii.out"); ^ In file included from ecuatii_grad_2.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatii_grad_2.cpp:57:9: error: reference to 'cout' is ambiguous cout<<fixed<<setprecision(2)<<x2<<" "<<x1; ^ ecuatii_grad_2.cpp:8:10: note: candidates are: <typeprefixerror>cout ofstream cout ("ecuatii.out"); ^ In file included from ecuatii_grad_2.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatii_grad_2.cpp:19:9: warning: unused variable 'n' [-Wunused-variable] int n,cnt=0,a,c,b,i=0,semn; ^ ecuatii_grad_2.cpp:19:11: warning: unused variable 'cnt' [-Wunused-variable] int n,cnt=0,a,c,b,i=0,semn; ^ ecuatii_grad_2.cpp:20:17: warning: unused variable 't' [-Wunused-variable] char s[256],t[256],*p,sep[]=" "; ^ ecuatii_grad_2.cpp:20:25: warning: unused variable 'p' [-Wunused-variable] char s[256],t[256],*p,sep[]=" "; ^ ecuatii_grad_2.cpp:20:27: warning: unused variable 'sep' [-Wunused-variable] char s[256],t[256],*p,sep[]=" "; ^
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ă.