Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

ZO/Sept2019 CSC126

Tutorial3
1. Convert the Algebra expression to arithmetic expression in programming language :

1.

2.

3.

4.

5.

2. Given is the compound assignment statement and answer the question:

Compound assignment Equivalent to

c += 7

c-=3

c*=4

c/=2

c^=2

3. Evaluate the given arithmetic expression:

i) 3 / 2 + 5.5
ii) 15.6 / 2 + 5
iii) 4 + 5 / 2.0
iv) 4 * 3 + 7 / 5 - 25.5
v) 34 % 5
vi) 4%6
ZO/Sept2019 CSC126

4. Explain the order of precedence for the following arithmetic expressions:

3*7–6+2*5/4+6

You might also like