ПОЖАЛУЙСТА Задача:1 D[1..2,1..6] числами 12,32,41,3,4,7,9,19,23,24,27,39 Задача 2: T[1..10,1..10] от 6 до 43.
Евгений9112
// PascalABC.NET 3.0, сборка 1144 от 16.01.2016
begin
var a:array[1..2,1..6] of integer:=
((12,32,41,3,4,7),(9,19,23,24,27,39));
Writeln(a);
var b:=MatrixRandom(10,10,6,43);
Writeln(b)
end.
Тестовое решение:
[[12,32,41,3,4,7],[9,19,23,24,27,39]]
[[29,39,20,21,36,34,10,25,32,40],[35,12,21,17,32,7,38,25,41,29],[6,33,17,19,30,25,34,37,21,23],[11,36,12,14,36,39,14,26,33,33],[17,34,39,30,14,34,29,19,20,26],[31,11,23,43,14,39,28,6,34,17],[43,17,10,15,35,42,6,13,25,36],[37,18,35,13,18,15,38,31,11,40],[39,21,22,38,36,43,18,12,43,40],[17,13,35,22,34,43,30,29,38,15]]
#include <iostream>
#include <ctime>
using namespace std;
int main ()
{
<span> srand (time(NULL));</span><span>
setlocale (0,"russian");</span><span>
int N;</span><span>
cout << "Кол-во чисел: ";
</span><span> cin >> N;</span><span>
int *array=new int [N];
</span><span> cout << "Массив: ";</span><span>
for (int i=0;i<N;i++)
</span><span> {
</span><span> array[i]=rand()\%30;
</span><span> cout << array[i] << ' ';</span><span>
}
</span><span> int x=1;
</span><span> for (int i=0;i<N;i++)</span><span>
{
x*=array[i];</span><span>
}
cout << "Произведение: " << x;</span><span>
system ("PAUSE>>VOID");</span><span>
return 0;
</span><span>}</span>