#1303
Calculator
Se dau două numere naturale și un simbol pentru una dintre operațiile +
, -
, *
, /
. Să se determine rezultatul operației aplicate pentru cele două numere.
Problema | Calculator | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54219839 | Utilizator | |
Fișier | calculator.cpp | Dimensiune | 157 B |
Data încărcării | 22 Noiembrie 2024, 13:25 | Scor / rezultat | Eroare de compilare |
calculator.cpp: In function 'int main()': calculator.cpp:7:8: error: 'a' was not declared in this scope if(a/b=R) cout<<R; ^ calculator.cpp:7:10: error: 'b' was not declared in this scope if(a/b=R) cout<<R; ^ calculator.cpp:7:12: error: 'R' was not declared in this scope if(a/b=R) cout<<R; ^ calculator.cpp:8:8: error: 'a' was not declared in this scope if(a*b=R) cout<<R; ^ calculator.cpp:8:10: error: 'b' was not declared in this scope if(a*b=R) cout<<R; ^ calculator.cpp:8:12: error: 'R' was not declared in this scope if(a*b=R) cout<<R; ^ calculator.cpp:9:8: error: 'a' was not declared in this scope if(a+b) cout<<R; ^ calculator.cpp:9:10: error: 'b' was not declared in this scope if(a+b) cout<<R; ^ calculator.cpp:9:19: error: 'R' was not declared in this scope if(a+b) cout<<R; ^ calculator.cpp:10:8: error: 'a' was not declared in this scope if(a-b) cout<<R; ^ calculator.cpp:10:10: error: 'b' was not declared in this scope if(a-b) cout<<R; ^ calculator.cpp:10:19: error: 'R' was not declared in this scope if(a-b) cout<<R; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Calculator 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ă.