srand(time(0));
const int columns = 5;
const int lines = 5;
int res = 0;
int A[lines][columns]{};
cout << "Massive A:" << endl;
for (int i = 0; i < lines; i++) {
}
cout << endl << "Summ: " << res << endl;
system("pause");
const int columns = 5;
const int lines = 5;
int res = 0;
int A[lines][columns]{};
cout << "Massive A:" << endl;
for (int i = 0; i < lines; i++) {
for (int j = 0; j < columns; j++) {
A[i][j] = rand() % 100;}
cout.width(3);
cout << A[i][j];
res += A[i][j];
cout << endl;
}
cout << endl << "Summ: " << res << endl;
system("pause");
Комментариев нет:
Отправить комментарий