#include <iostream>#include <stdlib.h>#include <time.h>using namespace std;const int n = 10;int main(){ int a[n][n]; cout << "Source array: "; srand(time(NULL)); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { a[i][j] = rand() % 500 + 100; cout << a[i][j] << " "; } cout << endl; } cout << "New array: "; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if ((a[i][j] % 2 == 0) && (i == j)) a[i][j] = 100; cout << a[i][j] << " "; } cout << endl; } //system("pause"); return 0;}