Computer Science, asked by ucfree750, 13 hours ago

1. Determine the result of the following:
Assume a=30 & b=6
(i) a+=b;
(ii) a%=b;
(iii) a -=b;
(iv) a*-b;​

Answers

Answered by frmnrmn3
0

Answer:

a+=b, -24

a%=b, 20

24

I don't know

Answered by MichMich0945
0

Answers:

  1. a = 36
  2. a = 0
  3. a = 24
  4. -180

Explanation:

  1. += operator will add a and b and assign its result to a.
  2. % operator returns the remainder, in this statement the remainder will be 0 as 6 completely divides 30, so %= operator will calculate the mod ( get the remainder ) and assign the result to the left operand.
  3. -= operator will subtract the left operand with the right operand and assign the result to the left operand
  4. a × [-b]

Hope this helps you!

Similar questions