+ 1

Operators

I understand that if x=4 x*=3 The answer is 12. How does this work though? If x = x * 3 how can x be both the answer, and in the problem?

23rd Mar 2021, 5:03 PM
Skipps
2 odpowiedzi
+ 3
Skipps There is no difference. x *= 3 is a short of x = x * 3 Same as above x += 3 // x = x + 3 x -= 3 // x = x - 3 x /= 3 // x = x / 3
23rd Mar 2021, 5:09 PM
A͢J
A͢J - avatar
0
x=4 x *= 3 ●x = x * 3 ●x = 4 * 3 ●x = 12
25th Mar 2021, 4:54 AM
SorryPark