это 2
Program
{
static void Main(string[] args)
{
Random rand = new Random();
Console.WriteLine("Введите размерность матрицы MxM :");
int M = Convert.ToInt32(Console.ReadLine());
int[,] matrix = new int[M, M];
for (int j = 0; j < M; j++)
{
for (int m = 0; m < M; m++)
{
matrix[j, m] = rand.Next(-10, 10);
Console.Write(matrix[j, m] + " ");
}
Console.WriteLine();
===== C++ 17 =====
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int nm = 12, nd = 28;
float t2009[12][28], t2010[12][28], pt[12][28];
float dT[nm][2] ={{-7.3,-4},{-9.8, -9.1},{-4.4, 2.6},{2.2,11.3},
{7.7,18.6},{12.1,22},{14.4,24.3},{12.5,21.9},
{7.4,15.7},{2.2,8.7},{-3.3,0.9},{-7.6,-3}};
srand(time(NULL));
for(int m = 0; m < nm; m++)
{
float k = (dT[m][1] - dT[m][0])/RAND_MAX;
for(int d =0; d < nd; d++)
{
t2009[m][d] = rand() * k + dT[m][0];
t2010[m][d] = rand() * k + dT[m][0];
pt[m][d] = t2010[m][d] / t2009[m][d] * 100;
}
}
cout << "2009\n";
for(int m = 0; m < nm; m++)
{
for(int d =0; d < nd; d++)
cout << fixed << setw(5) << setprecision(1) << t2009[m][d];
cout << endl;
}
cout << "2010\n";
for(int m = 0; m < nm; m++)
{
for(int d =0; d < nd; d++)
cout << fixed << setw(5) << setprecision(1) << t2010[m][d];
cout << endl;
}
cout << "PERCENTS\n";
for(int m = 0; m < nm; m++)
{
for(int d =0; d < nd; d++)
cout << fixed << setw(5) << setprecision(0) << pt[m][d];
cout << endl;
}
return 0;
}
2) (X>0)∧(Y≤0)∧(Z≤0) ∨ (Y>0)∧(X≤0)∧(Z≤0) ∨ (Z>0)∧(X≤0)∧(Y≤0)
3) (X>10)∧(Y≤10)∧(Z≤10) ∨ (Y>10)∧(X≤10)∧(Z≤10) ∨
(Z>10)∧(X≤10)∧(Y≤10)
4) (X≠104) ∧ (Y≠104) ∧ (Z≠104)