...
Code Block |
---|
int x1 = 10; x1++; // increment value by one x1--; // decrement value by one x1 += 2; // Add assign, this is the same as writing x1 = x1+4; x1 -= 2; // Subtract assign, this is the same as writing x1 = x1-4; x1 /= 2; // Divide assign (less common), this is the same as writing x1 = x1/2; |
Exercise 2:
Take your results form exercise 1 and modify your code to use variables. Create a variable X and variable Y that can be used to position your graphic on the screen.