0

Pemdas?

When performing math functions, such as x*5+6/2 would the multiplication be performed first along with the division and the addition after? Or would the computer solve straight across? Also, is using math notation possible? Like x(5+6)/2?

27th Jan 2021, 4:42 AM
Johnathan Fleischer
Johnathan Fleischer - avatar
1 ответ
+ 3
like math you could use parenthesis in expressions, but unlike it you cannot skip multiplication sign (*): x*(5+6)/2 like math, there's operators precedences: common operators (+-*/) follow common precedence (*/ first, +- second), but less common operators could have slightly difference between languages and requires to refer to language reference ;)
27th Jan 2021, 5:43 AM
visph
visph - avatar