+ 2
Print(1+2+3+4%5)
Ans is 10 how
5 Answers
+ 5
As % operator gives remainder
So 4%5 will give 4 as 4 i s not divisible by 5
Hence the result.
+ 2
First 4%5 is evaluated as % has higher precedence than + operator and it returns remainder ,so it's now
1+2+3+4
+ 2
Because 4%5 is equal to 4, and 4+3+2+1 is equal to 10
+ 1
Thank u