Lowest price ever! Learn Generative AI for 48% less!
Get my discount- 1
Can anyone explain the execution of this code?
a=200 , b=2 , c=20, d=10, e=4 Print(a+b-c/d*e) Answer is 194.0 I want to know how they got the answer
3 Answers
+ 6
you can look up operator precedence on whatever language this is. Also a good idea to specify the language next time so people that know that language can answer your question
+ 2
I can try to make it simple-->
Higher priority of operator
() Bracket
* Multiplication
/ Division
Then
+ Addition
- substitute
///* Same order's operators read from left to right *///
0
I have tried using operater precendence but the answer which I arrived is not the correct one. Can anyone help me in solving le calculation part? (Print statement)