0
3+2+1-5+4%2-1/4+6
The answer is 7, i dont get it. Can someone show me step by step how to get it?
4 Réponses
+ 9
3+2+1-5+4%2-1/4+6
modulus and division operator has higher priority so
4%2=0 and 1/4=0
then
3+2+1-5=1
4%2=0
-1/4=0
so now only 1+6 which is equal to 7
so output is 7
0
Nope it won't be 7.In programming there are some function that can wrap this float number and give result in integer. I think 😒
0
-1/4=0? What?😐
0
If all numbers are in floating point, then ans will be 6.75. Figured it out thx guys. Seems floating point will be more accurate.