2+3*4%8-5/4
You asked:
MathBot Answer:
\[2 + \left( 3 \cdot 4 \right) \:\%\: 8 - \frac{5}{4} = \frac{19}{4} = 4.75\]
\[\begin{aligned}2 + \left( 3 \cdot 4 \right) \:\%\: 8 - \frac{5}{4}& = 2 + \left(3 \cdot 4 \:\%\: 8\right) - \frac{5}{4}\\& = 2 + \left(12 \:\%\: 8\right) - \frac{5}{4}\\& = 2 + 4 - \frac{5}{4}\\& = 6 - \frac{5}{4}\\& = \frac{19}{4}\end{aligned}\]
The notation \(m \% n\) denotes the remainder of the integer \(m\) divided by the integer \(n\). \(m \% n = r\) means that given integers \(m\) and \(n\), where \(n\) is non-zero, there exist integers \(q\) and \(r\), where \(\lvert r \rvert < \lvert n \rvert\), such that \(m = q n + r\). MathBot adopts the convention that the remainder \(r\) and the divisor \(n\) share the same sign. Alternate notations for \(m \% n\) are \(\operatorname{mod}(m, n)\) and \(m \bmod n\).