#1359
Scrieţi un program care să citească o ecuație de un anumit tip și care să determine: a) tipul ecuației citite; b) soluția ecuației obținută prin rezolvarea acestei ecuații.
Problema | ecuatie2 | Operații I/O |
![]() ecuatie2.in /ecuatie2.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58345963 | Utilizator | |
Fișier | ecuatie2.cpp | Dimensiune | 2.11 KB |
Data încărcării | 28 Mai 2025, 13:49 | Scor / rezultat | Eroare de compilare |
ecuatie2.cpp: In function 'int main()': ecuatie2.cpp:9:5: error: reference to 'cin' is ambiguous cin >> s; ^ ecuatie2.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from ecuatie2.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:13:9: error: 'fin' was not declared in this scope fin >> s; ^ ecuatie2.cpp:16:13: error: 'fout' was not declared in this scope fout << 2 << '\n'; ^ ecuatie2.cpp:28:13: error: 'fout' was not declared in this scope fout << 4 << '\n'; ^ ecuatie2.cpp:40:13: error: 'fout' was not declared in this scope fout << 6 << '\n'; ^ ecuatie2.cpp:52:13: error: 'fout' was not declared in this scope fout << 8 << '\n'; ^ ecuatie2.cpp:69:13: error: 'fin' was not declared in this scope fin >> s; ^ ecuatie2.cpp:73:13: error: 'fin' was not declared in this scope fin >> s; ^ ecuatie2.cpp:74:13: error: 'fout' was not declared in this scope fout << 1 << '\n'; ^ ecuatie2.cpp:80:13: error: 'fin' was not declared in this scope fin >> s; ^ ecuatie2.cpp:81:13: error: 'fout' was not declared in this scope fout << 3 << '\n'; ^ ecuatie2.cpp:87:13: error: 'fin' was not declared in this scope fin >> s; ^ ecuatie2.cpp:88:13: error: 'fout' was not declared in this scope fout << 5 << '\n'; ^ ecuatie2.cpp:94:13: error: 'fin' was not declared in this scope fin >> s; ^ ecuatie2.cpp:95:13: error: 'fout' was not declared in this scope fout << 7 << '\n'; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ecuatie2 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ă.