Computer Science, asked by santoshprince1634, 11 months ago

what is the output for 8*3-2*(9-8%5)%2

Answers

Answered by vaishnavi112759
0
16.6 is right answer

vaishnavi112759: kya
vaishnavi112759: no 16.6 is right answer
santoshprince1634: just show step by step that how u did...
Answered by siddhartharao77
1

Given : 8 * 3 - 2 * (9 - 8%5)%2.

% is called as modulo operator. It returns the remainder after performing division.

(i)

(9 - 8%5)

⇒ 9 - 3

⇒ 6


(ii) 2 * (6)%2

⇒ 2 * 0

⇒ 0.


(iii) 8 * 3

⇒ 24.


Hence,

⇒ (8 * 3) - (2 * (9 - 8%5)%2)

⇒ 24 - 0

⇒ 24.



Therefore, the final answer is 24.


Hope this helps!


santoshprince1634: thank u sir
siddhartharao77: welcome
Similar questions