#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 | #64333173 | Utilizator | |
| Fișier | af.cpp | Dimensiune | 836 B |
| Data încărcării | 30 Aprilie 2026, 09:51 | Scor/rezultat | 20 puncte |
af.cpp: In function ‘int main()’: af.cpp:13:11: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else] 13 | if(c1=='+') | ^ af.cpp:21:10: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation] 21 | else | ^~~~ af.cpp:23:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’ 23 | if(c1=='x') | ^~ af.cpp:18:15: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else] 18 | if(c1=='-') | ^ af.cpp:26:10: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation] 26 | else | ^~~~ af.cpp:28:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’ 28 | if(c1==':' && y!=0) | ^~ af.cpp:23:15: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else] 23 | if(c1=='x') | ^ af.cpp:28:15: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else] 28 | if(c1==':' && y!=0) | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0.001 secunde | OK. | 10 | 10 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 6 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 20 | |||||
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ă.