#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 | #64333058 | Utilizator | |
| Fișier | af.cpp | Dimensiune | 464 B |
| Data încărcării | 30 Aprilie 2026, 09:48 | Scor/rezultat | Eroare de compilare |
af.cpp:16:31: warning: missing terminating ' character 16 | fout<<"Adevarat"<<'\n; | ^ af.cpp:16:31: error: missing terminating ' character 16 | fout<<"Adevarat"<<'\n; | ^~~~ af.cpp:21:31: warning: missing terminating ' character 21 | fout<<"Adevarat"<<'\n; | ^ af.cpp:21:31: error: missing terminating ' character 21 | fout<<"Adevarat"<<'\n; | ^~~~ af.cpp: In function ‘int amin()’: af.cpp:17:13: error: expected primary-expression before ‘else’ 17 | else | ^~~~ 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:21:31: error: expected primary-expression at end of input 21 | fout<<"Adevarat"<<'\n; | ^ af.cpp:20:13: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 20 | if(x-y==z) | ^~ af.cpp:21:31: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 21 | fout<<"Adevarat"<<'\n; | ^ af.cpp:21:31: error: expected ‘}’ at end of input af.cpp:12:5: note: to match this ‘{’ 12 | { | ^ af.cpp:21:31: error: expected ‘}’ at end of input 21 | fout<<"Adevarat"<<'\n; | ^ af.cpp:9:1: note: to match this ‘{’ 9 | { | ^ af.cpp:21:31: warning: no return statement in function returning non-void [-Wreturn-type] 21 | fout<<"Adevarat"<<'\n; | ^
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ă.