"Hi, Amigo. A couple more tasks for you:"
8
Task
Module 1. Java Syntax, level 8, lesson 0
Multiplication table
Initialize the MULTIPLICATION_TABLE array as a new int[10][10], fill it with a multiplication table,
and then display it on the console in the following form:
1 2 3 4 …
2 4 6 8 …
3 6 9 12 …
4 8 12 16 …
…
The numbers in each line are separated by a space.
2
Task
Module 1. Java Syntax, level 8, lesson 2
Cutting down the middle
You are given a two-dimensional chars array In the main method, you need to replace all interior elements with a hyphen (minus sign).
Use the private printArray() method to display the contents of the array on the screen.
Example array:
a b c d e f
j h i j k l
m n o p q r
s t u v w x
After running
2
Task
Module 1. Java Syntax, level 8, lesson 2
Chess board
Let's create a program to generate square chessboards with a given dimension.
In the Solution class, you have a two-dimensional array of characters (the array field). Requirements:
- Read a number from the keyboard. This will be the dimension of our board (the length of a side);
- Initialize the arr