0
Simple calculation ??
I don't understand why the answer to this is 10. int a = 10, b; b = a % (a + (a+1)/a); cout << b Parentheses first: 10 % (10 +11/10) Then?? What am I missing? Thanks
2 Réponses
+ 2
11/10 is 1, + 10 is 11
10 % 11 is 10.
What output are you expecting?
0
Oh, of course.
I just need more coffee.
Thanks!