Create a program that introduces a two-dimensional array of integers from the keyboard, puts in a one-dimensional array the sum of non-negative elements in rows, displays this array on the screen before the first zero element and displays the number of remaining elements.
#include "stdafx.h" #include <iostream> using namespace std; int main() { setlocale(LC_ALL, "Russian"); int i, j, n, m; cout << "n="; cin >> n; cout << "m="; cin >> m; int**mas = new int*[n]; for (i = 0; i < n; i++) { mas[i] = new int[m]; } for (i = 0; i < n; i++) { for (j = 0; j < m; j++) { cin >> mas[i][j]; } } cout << "_ _ _ _ _ _ _ _ "<<"\n"; int *mas1 = new int[n]; for (i = 0; i < n; i++) { int sum = 0; for (j = 0; j < m; j++); { if (mas[i][j] >= 0) sum += mas[i][j]; mas1[i] = sum; } } for (i = 0; i < n; i++) { cout <<mas1[i]<< " "; } system("pause"); return 0; } 
for(....); { ... }for(....); { ... }- this is the notion of authors of textbooks ... - Harry