#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 | #64533212 | Utilizator | |
| Fișier | af.cpp | Dimensiune | 995 B |
| Data încărcării | 12 Mai 2026, 21:02 | Scor/rezultat | Eroare de compilare |
af.cpp: In function ‘int main()’: af.cpp:10:5: error: ‘fin’ was not declared in this scope; did you mean ‘sin’? 10 | fin >> n; | ^~~ | sin af.cpp:18:17: error: ‘fout’ was not declared in this scope; did you mean ‘cout’? 18 | fout << "Adevarat" << '\n'; | ^~~~ | cout af.cpp:20:17: error: ‘fout’ was not declared in this scope; did you mean ‘cout’? 20 | fout << "Fals" << '\n'; | ^~~~ | cout af.cpp:16:11: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else] 16 | if(c1=='+') | ^ af.cpp:23:17: error: ‘fout’ was not declared in this scope; did you mean ‘cout’? 23 | fout << "Adevarat" << '\n'; | ^~~~ | cout af.cpp:25:17: error: ‘fout’ was not declared in this scope; did you mean ‘cout’? 25 | fout << "Fals" << '\n'; | ^~~~ | cout af.cpp:21:11: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else] 21 | if(c1=='-') | ^ af.cpp:28:17: error: ‘fout’ was not declared in this scope; did you mean ‘cout’? 28 | fout << "Adevarat" << '\n'; | ^~~~ | cout af.cpp:30:17: error: ‘fout’ was not declared in this scope; did you mean ‘cout’? 30 | fout << "Fals" << '\n'; | ^~~~ | cout af.cpp:26:11: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else] 26 | if(c1=='x') | ^ af.cpp:33:17: error: ‘fout’ was not declared in this scope; did you mean ‘cout’? 33 | fout << "Adevarat" << '\n'; | ^~~~ | cout af.cpp:35:17: error: ‘fout’ was not declared in this scope; did you mean ‘cout’? 35 | fout << "Fals" << '\n'; | ^~~~ | cout af.cpp:37:17: error: ‘fout’ was not declared in this scope; did you mean ‘cout’? 37 | fout << "Fals" << '\n'; | ^~~~ | cout
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ă.