#1359
ecuatie2
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 | #33945441 | Utilizator | |
Fișier | ecuatie2.cpp | Dimensiune | 2.09 KB |
Data încărcării | 15 Ianuarie 2022, 13:22 | Scor / rezultat | Eroare de compilare |
ecuatie2.cpp: In function 'int main()': ecuatie2.cpp:8:5: error: reference to 'cin' is ambiguous cin >> s; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:12:9: error: reference to 'cin' is ambiguous cin >> s; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:15:13: error: reference to 'cout' is ambiguous cout << 2 << '\n'; ^ ecuatie2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatie2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatie2.cpp:16:13: error: reference to 'cin' is ambiguous cin >> s; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:20:17: error: reference to 'cin' is ambiguous cin >> s; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:22:13: error: reference to 'cin' is ambiguous cin >> b; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:23:13: error: reference to 'cout' is ambiguous cout << b - a; ^ ecuatie2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatie2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatie2.cpp:27:13: error: reference to 'cout' is ambiguous cout << 4 << '\n'; ^ ecuatie2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatie2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatie2.cpp:28:13: error: reference to 'cin' is ambiguous cin >> s; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:32:17: error: reference to 'cin' is ambiguous cin >> s; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:34:13: error: reference to 'cin' is ambiguous cin >> b; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:35:13: error: reference to 'cout' is ambiguous cout << a + b; ^ ecuatie2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatie2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatie2.cpp:39:13: error: reference to 'cout' is ambiguous cout << 6 << '\n'; ^ ecuatie2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatie2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatie2.cpp:40:13: error: reference to 'cin' is ambiguous cin >> s; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:44:17: error: reference to 'cin' is ambiguous cin >> s; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:46:13: error: reference to 'cin' is ambiguous cin >> b; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:47:13: error: reference to 'cout' is ambiguous cout << b / a; ^ ecuatie2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatie2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatie2.cpp:51:13: error: reference to 'cout' is ambiguous cout << 8 << '\n'; ^ ecuatie2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatie2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatie2.cpp:52:13: error: reference to 'cin' is ambiguous cin >> s; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:56:17: error: reference to 'cin' is ambiguous cin >> s; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:58:13: error: reference to 'cin' is ambiguous cin >> b; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:59:13: error: reference to 'cout' is ambiguous cout << a * b; ^ ecuatie2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatie2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatie2.cpp:68:13: error: reference to 'cin' is ambiguous cin >> s; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:72:13: error: reference to 'cin' is ambiguous cin >> s; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:73:13: error: reference to 'cout' is ambiguous cout << 1 << '\n'; ^ ecuatie2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatie2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatie2.cpp:74:13: error: reference to 'cin' is ambiguous cin >> s >> b; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:75:13: error: reference to 'cout' is ambiguous cout << b - a; ^ ecuatie2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatie2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatie2.cpp:79:13: error: reference to 'cin' is ambiguous cin >> s; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:80:13: error: reference to 'cout' is ambiguous cout << 3 << '\n'; ^ ecuatie2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatie2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatie2.cpp:81:13: error: reference to 'cin' is ambiguous cin >> s >> b; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:82:13: error: reference to 'cout' is ambiguous cout << a - b; ^ ecuatie2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatie2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatie2.cpp:86:13: error: reference to 'cin' is ambiguous cin >> s; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:87:13: error: reference to 'cout' is ambiguous cout << 5 << '\n'; ^ ecuatie2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatie2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatie2.cpp:88:13: error: reference to 'cin' is ambiguous cin >> s >> b; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:89:13: error: reference to 'cout' is ambiguous cout << b / a; ^ ecuatie2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatie2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatie2.cpp:93:13: error: reference to 'cin' is ambiguous cin >> s; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:94:13: error: reference to 'cout' is ambiguous cout << 7 << '\n'; ^ ecuatie2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatie2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ecuatie2.cpp:95:13: error: reference to 'cin' is ambiguous cin >> s >> b; ^ ecuatie2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("ecuatie2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ecuatie2.cpp:96:13: error: reference to 'cout' is ambiguous cout << a / b; ^ ecuatie2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("ecuatie2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from ecuatie2.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 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ă.