Writing a program of a square showing numbers
in
Programming Questions
•
2 years ago
Hello,
I have to write a program to display a grid of nine consecutive numbers on the screen and generate new sets of numbers when clicked.
The program should start by displaying the numbers 1 to 9 in coloured squares as shown below:
Each time the canvas is clicked on with the mouse, a new set of consecutive numbers should be displayed, stating from a random value. So for example, clicking on the initial display as shown above might result in:
Can somebody help me with the code for this program? Any help and suggestions would be appreciated. Thank you!
1