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)
- How FHA Loans Can Help You Afford Your Dream Home in California - January 14, 2025
- Microsoft Teams Test Call - January 12, 2025
- BSOD caused by hal.dll and ntoskernal.exe - January 12, 2025