- 3
Eval function wrong calculating
If user calculate 5 + 5 * 10 it's gonna return 55, which is wrong it's should be 100. And how to fix it https://code.sololearn.com/WRh3fh8viTWq/?ref=app
7 Respuestas
+ 4
Nop it's not wrong
It also follows BODMAS rule of basic maths so if you do (5+5)*10 then it will first solve bracket and return 100 else it will first do 5*10 then add 5 to give 55
+ 3
EsaKurniawan add a bracket button also in your calculator.
I allready told (5+5)*10 will give you 100
0
There's nothing to fix apart from your math skills.
0
How to make it equal 100
0
Or just hit "=" after "5+5".
0
Thanks a lot all of you guys for helping me I'll try your advice