Complete the code to assign the value 10 to variable x.
int x; x [1] 10;
The assignment operator = assigns the value on the right to the variable on the left.
Complete the code to add 5 to variable y using an assignment operator.
int y = 10; y [1] 5;
The += operator adds the value on the right to the variable and assigns the result back to it.
Fix the error in the code to multiply variable z by 3 using an assignment operator.
int z = 4; z [1] 3;
The *= operator multiplies the variable by the value on the right and assigns the result back.
Complete the code to subtract 2 from variable a using an assignment operator.
int a = 7; a [1] 2;
The -= operator subtracts the value on the right from the variable and assigns the result back to it.
Complete the code to divide variable b by 4 using an assignment operator.
int b = 20; b [1] 4;
The /= operator divides the variable by the value on the right and assigns the result back to it.