#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 | #64333069 | Utilizator | |
| Fișier | af.cpp | Dimensiune | 455 B |
| Data încărcării | 30 Aprilie 2026, 09:49 | Scor/rezultat | Eroare de compilare |
af.cpp: In function ‘int main()’: af.cpp:14:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 14 | if(c1=='+') | ^~ af.cpp:19:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 19 | if(c1=='-') | ^~ af.cpp:14:11: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else] 14 | if(c1=='+') | ^ af.cpp:20:16: error: expected primary-expression at end of input 20 | if( | ^ af.cpp:20:16: error: expected ‘)’ at end of input 20 | if( | ~^ | ) af.cpp:20:16: error: expected statement at end of input af.cpp:19:13: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 19 | if(c1=='-') | ^~ af.cpp:20:16: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 20 | if( | ^ af.cpp:20:16: error: expected ‘}’ at end of input af.cpp:12:5: note: to match this ‘{’ 12 | { | ^ af.cpp:20:16: error: expected ‘}’ at end of input 20 | if( | ^ af.cpp:9:1: note: to match this ‘{’ 9 | { | ^
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ă.