0

x*=a and x=3

4th May 2018, 9:55 PM
Jeremy
Jeremy - avatar
2 Answers
+ 3
x *= a means x = x * a it works with all math operators e.g. x += a
4th May 2018, 10:12 PM
TurtleShell
TurtleShell - avatar
+ 3
x = 3 sets 'x' to equal 3 x*= a sets 'x' to equal whatever the value of x already was * the value of a eg x = 3 a = 5 x*=a means x = 3 * 5 so x = 15 If x didn't already have a value then x*=a would equal 0 regardless of the value of a as 0 * anything is still 0.
5th May 2018, 4:55 AM
Duncan
Duncan - avatar