#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 | #62687457 | Utilizator | |
| Fișier | af.cpp | Dimensiune | 932 B |
| Data încărcării | 29 Ianuarie 2026, 16:29 | Scor/rezultat | Eroare de compilare |
af.cpp:3:1: error: 'ifstream' does not name a type ifstream f("af.in"); ^ af.cpp:4:1: error: 'ofstream' does not name a type ofstream g("af.out"); ^ af.cpp: In function 'int main()': af.cpp:10:5: error: 'f' was not declared in this scope f>>n; ^ af.cpp:17:17: error: 'g' was not declared in this scope g<<"Adevarat"<<endl; ^ af.cpp:17:32: error: 'endl' was not declared in this scope g<<"Adevarat"<<endl; ^ af.cpp:19:17: error: 'g' was not declared in this scope g<<"Fals"<<endl; ^ af.cpp:19:28: error: 'endl' was not declared in this scope g<<"Fals"<<endl; ^ af.cpp:25:17: error: 'g' was not declared in this scope g<<"Adevarat"<<endl; ^ af.cpp:25:32: error: 'endl' was not declared in this scope g<<"Adevarat"<<endl; ^ af.cpp:27:17: error: 'g' was not declared in this scope g<<"Fals"<<endl; ^ af.cpp:27:28: error: 'endl' was not declared in this scope g<<"Fals"<<endl; ^ af.cpp:32:17: error: 'g' was not declared in this scope g<<"Adevarat"<<endl; ^ af.cpp:32:32: error: 'endl' was not declared in this scope g<<"Adevarat"<<endl; ^ af.cpp:34:17: error: 'g' was not declared in this scope g<<"Fals"<<endl; ^ af.cpp:34:28: error: 'endl' was not declared in this scope g<<"Fals"<<endl; ^ af.cpp:39:17: error: 'g' was not declared in this scope g<<"Adevarat"<<endl; ^ af.cpp:39:32: error: 'endl' was not declared in this scope g<<"Adevarat"<<endl; ^ af.cpp:41:17: error: 'g' was not declared in this scope g<<"Fals"<<endl; ^ af.cpp:41:28: error: 'endl' was not declared in this scope g<<"Fals"<<endl; ^
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ă.