#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 | #64042864 | Utilizator | |
| Fișier | af.cpp | Dimensiune | 824 B |
| Data încărcării | 11 Aprilie 2026, 20:52 | Scor/rezultat | Eroare de compilare |
af.cpp: In function 'int main()': af.cpp:17:15: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(c=="+") ^ af.cpp:17:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] af.cpp:17:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(c=="+") ^ af.cpp:22:15: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(c=="-") ^ af.cpp:22:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] af.cpp:22:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(c=="-") ^ af.cpp:27:15: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(c=="x") ^ af.cpp:27:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] af.cpp:27:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(c=="x") ^ af.cpp:32:15: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(c==":") ^ af.cpp:32:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] af.cpp:32:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(c==":") ^
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ă.