一个矩阵,凡是出现0的位置,其横列都将被替换为0
#include "iostream"
#include <time.h>
using namespace std;
void zero(int * arraysforfind[] ,int r,int co){
int row = r;
int column = co;
int *temprow = new int [row];
int *tempcolumn = new int [column];
for (int i = 0; i < row; ++i)
{
temprow[i] = 1;
//cout<<temprow[i]<<" ";
}
for (int i = 0; i < column; ++i)
{
tempcolumn[i] = 1;
// cout<<tempcolumn[i]<<" ";
}
for (int i = 0; i < row; ++i)
{
for (int j = 0; j < column; ++j)
{
if (arraysforfind[i][j] == 0)
{
temprow[i] = 0;
tempcolumn[j] = 0;
}
}
}
for (int i = 0; i < row; ++i)
{
if (temprow[i