Ответ:
#include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "russian");
int a[100][100];
int n;
cin >> n;
int k = n + 15;
for (int i = 0; i < 2 * n + 5; i++)
for (int j = 0; j < 2 * n + 5; j++)
a[i][j] = -k + rand() % ((k + 1) -(-k)); ;
cout << endl;
cout<<a[i][j] <<" ";
}
Объяснение:
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
#include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "russian");
int a[100][100];
int n;
cin >> n;
int k = n + 15;
for (int i = 0; i < 2 * n + 5; i++)
for (int j = 0; j < 2 * n + 5; j++)
a[i][j] = -k + rand() % ((k + 1) -(-k)); ;
for (int i = 0; i < 2 * n + 5; i++)
{
cout << endl;
for (int j = 0; j < 2 * n + 5; j++)
cout<<a[i][j] <<" ";
}
}
Объяснение: