Есть ответ 👍

Очееень вас решиите ​

150
269
Посмотреть ответы 1

Ответы на вопрос:

arina1234as
4,7(50 оценок)

#include < iostream> #include < stdlib.h> #include < time.h> using namespace std; const int n = 10; int main() {       int a[n][n];       cout < < "source array: \n";       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: \n";       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; }

Популярно: Информатика