I want the answer with full explanation :
•How the output will be 48??
Language:Java
50 point question.
Hoping for gud answer:(
Attachments:
Answers
Answered by
1
please mark my answer as brainliest
Attachments:
shardul1925:
but according to rule...12 should be multiplied naa
Answered by
5
int a = 12, b = 8;
a*=(++a/6) + (b++%3);
(i)
(++a/6) + (b++%3);
= (13/6) + (8/3);
= 2 + 2
= 4.
(ii)
a* = (++a/6) + (b++%3)
a = a * [++a/6 + b++%3]
a = 12 * 4
a = 48.
Important points:
(i) % is called as modulo division. Remainder after division.
(ii) int is used to store whole numbers. In the above example, i have written 13/6 = 2. it should be 2.166667 but since the datatype is int, you cannot store 2.16667 in an integer, but you can in a float.
Hope it helps!
Similar questions