#2641
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 | #57209208 | Utilizator | |
Fișier | af.cpp | Dimensiune | 1.06 KB |
Data încărcării | 20 Martie 2025, 10:50 | Scor / rezultat | Eroare de compilare |
af.cpp:5:13: error: variable 'std::ifstream fin' has initializer but incomplete type ifstream fin("af.in"); ^ af.cpp:6:14: error: variable 'std::ofstream fout' has initializer but incomplete type ofstream fout("af.out"); ^ af.cpp: In function 'void TrueOrFalse()': af.cpp:29:7: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(sign == '+') ^ af.cpp:35:10: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(sign == '-') ^ af.cpp:41:10: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(sign == 'x') ^ af.cpp:47:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(sign == ':') ^
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ă.