In this project, we cover:
-
Assignment:
int x = 10;: Declares a variable named x and assigns it the value 10.x = 15: Reassigns a new value (15) to the already declared variable x.
-
Compound Operators:
x++: Increases the value of x by 1.x--: Decreases the value of x by 1.x += 5: Adds 5 to the current value of x and assigns the result back to x.x /= 5: Divides the current value of x by 5 and assigns the result back to x.x ~/= 5: Performs integer division on x by 5 and assigns the result back to x.x *= 5:Multiplies the current value of x by 5 and assigns the result back to x.x -= 5: Subtracts 5 from the current value of x and assigns the result back to x.x %= 5: Calculates the remainder when x is divided by 5 and assigns it back to x.