351,668 views
10 votes
10 votes
8) What will display after this program executes?a +5+4 * 2b + 4 MOD 5DISPLAY a + b

8) What will display after this program executes?a +5+4 * 2b + 4 MOD 5DISPLAY a + b-example-1
User Niklas Wulff
by
2.4k points

1 Answer

13 votes
13 votes

Step 1. Finding the value of a.

To find the value of a, we need to solve the following expression:


5+4\cdot2

The multiplication should be done before the addition:


5+8

thus the result is:


13
a=13

User Secret
by
3.1k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.