25/4+4*10%3
6+4*1
6+1
7
The precedence is
/ , * , %
going left to right
25 / 4 = 6
4 * 10 = 40
40 % 3 = 1
6 + 1 = 7;
With the parenthesis it would look like this
(25 / 4 ) + ( (4 * 10) % 3)
modulo operator is integer only, no fraction
Here’s a crazy idea: Write one line of Java code and find out.
Answer 6
the answer would be 7..
Answer 7
1.25, the expression will be evaluated left to right.
Latest posts by Answer Prime (see all)
- Failure configuring Windows Updates, Reverting changes, unable to boot to desktop. - April 18, 2024
- Windows 10 Taskbar is Empty - April 18, 2024
- Is there a way to get Theme Park/Theme Hospital on windows 8? - April 18, 2024