Skip to the content.

times table program

This is a variation of the counter sample where we increment by a random number instead of just 1. This is a fun program to pratice times table.

The variable Y is used to hold the random multiplier and the variable X is used for the counter. Every time the user presses A, we add X + Y and store it in X.

when shake, store random number in Y

when variable Y is changed, set X as Y to reset the counter

when press button A, increment variable X

when press button A, increment variable X