Given n*n spaced integers of a 2-d Array.Task is to set every value in the matrix to 0 if that row or columns contains a 0.
First line of input file contains an integer T, denoting the number of test cases. Then T test case follow. First line of each test case contains a integer n.Next line contains n*n spaced integers.
For each test case, Print the final matrix formed after performing the required task.
1 2 3 4 0 5 0 6 7
0 0 3 0 0 0 0 0 0
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.