Answer the question
In order to leave comments, you need to log in
What is the algorithm for filling the matrix?
Hello gentlemen.
I need your advice, because I've been struggling with the problem for several hours now.
A task was set at the university:
There is an input, a number from 25 to 100 is entered into it. After that, an array is formed from 1 to the number from the input and a 5x5 matrix must be created, the values in the "cells" must be within that array and then display the matrix on the page .
Example:
The number 40 was entered into the input. The numbers are randomly obtained from the array 1-40. As a result, the matrix looks like this:
1 10 17 26 33
3 11 18 27 34
4 12 19 29 35
5 14 21 31 36
8 16 24 32 40
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question