#2641
AF
Gigel are ca temă la matematică să precizeze valoarea de adevăr a unor expresii de forma nr1 semn nr2 = nr3
, unde nr1
, nr2
și nr3
sunt numere naturale, iar semn
poate fi +
, -
, x
sau :
reprezintând adunarea, scăderea, înmulțirea și împărțirea. Ajutați-l pe Gigel să rezolve tema la matematică.
-
Problema | AF | Operații I/O |
af.in /af.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #47841758 | Utilizator | |
Fișier | af.cpp | Dimensiune | 986 B |
Data încărcării | 07 Ianuarie 2024, 17:15 | Scor / rezultat | Eroare de compilare |
af.cpp:3:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("af.in"); ^ af.cpp:4:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("af.out"); ^ af.cpp: In function 'int main()': af.cpp:8:5: error: reference to 'cin' is ambiguous cin >> n; ^ af.cpp:3:10: note: candidates are: <typeprefixerror>cin ifstream cin("af.in"); ^ In file included from af.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ af.cpp:13:9: error: reference to 'cin' is ambiguous cin >> x >> c1 >> y >> c2 >> z; ^ af.cpp:3:10: note: candidates are: <typeprefixerror>cin ifstream cin("af.in"); ^ In file included from af.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ af.cpp:16:17: error: reference to 'cout' is ambiguous cout << "Adevarat" << '\n'; ^ af.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("af.out"); ^ In file included from af.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ af.cpp:18:17: error: reference to 'cout' is ambiguous cout << "Fals" << '\n'; ^ af.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("af.out"); ^ In file included from af.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ af.cpp:14:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(c1=='+') ^ af.cpp:21:17: error: reference to 'cout' is ambiguous cout << "Adevarat" << '\n'; ^ af.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("af.out"); ^ In file included from af.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ af.cpp:23:17: error: reference to 'cout' is ambiguous cout << "Fals" << '\n'; ^ af.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("af.out"); ^ In file included from af.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ af.cpp:19:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(c1=='-') ^ af.cpp:26:17: error: reference to 'cout' is ambiguous cout << "Adevarat" << '\n'; ^ af.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("af.out"); ^ In file included from af.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ af.cpp:28:17: error: reference to 'cout' is ambiguous cout << "Fals" << '\n'; ^ af.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("af.out"); ^ In file included from af.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ af.cpp:24:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(c1=='x') ^ af.cpp:31:17: error: reference to 'cout' is ambiguous cout << "Adevarat" << '\n'; ^ af.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("af.out"); ^ In file included from af.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ af.cpp:33:17: error: reference to 'cout' is ambiguous cout << "Fals" << '\n'; ^ af.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("af.out"); ^ In file included from af.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ af.cpp:35:17: error: reference to 'cout' is ambiguous cout << "Fals" << '\n'; ^ af.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("af.out"); ^ In file included from af.cpp:1:0: /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 AF 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ă.