#include
#include
#include
const unsigned int n = 5;
const unsigned int m = 6;
int main()
{
srand(time(NULL));
int i, j;
int a[n][m];
printf("\nSource:\n");
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
a[i][j] = rand() % 201 - 100;
printf("%d\t", a[i][j]);
}
printf("\n");
}
printf("\nResult:\n");
for ( i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
if (a[i][j] < 0) a[i][j] = 0;
printf("%d\t", a[i][j]);
}
printf("\n");
}
getchar();
}