This is not C code, it will not compile - it is pseudo-code to give you a hand thinking about how you might program such a problem. We can't write programs for you. We're here to help you learn.
Get dimension of matrix rows, cols;
for i = 0; i < rows; i++;
for j = 0; j < cols; j++;
input data to float array[j];
if (j == i) denominator = array[j];
for k = 0; k < cols; k++
array[k] = array[k] / denominator;