my program is made to enter a matix,in which it finds all of the column`s minimum numbers which are >0 and then put them under the last row.i have sucseded entering the array and puting it out,but i think my IF is wrong somehow.I have tried initialising the last row of the array,which would contain the minimum values,but in the output it doesnt change at all and none of the values of the last row make any sense.Here`s the program,please,help me:
#include<stdio.h>
#include<stdlib.h>
main(){
int i,j;
puts("Enter number of rows and then the columns of the matrix");
scanf("%d %d",&i,&j);
float matr[i+1][j]; //the last row is for the minimum values of every row
puts("Please,enter numbers of the matrix");
for(int row=0;row<i;row++)
for(int col=0;col<j;col++)
scanf("%f",&matr[row][col]);
for(int col=0;col<j;col++) //finding the lowest positive number in each column
for(int row=0;row<i;row++)
if((matr[i+1][col]==0 || matr[i+1][col]>matr[row][col])&& matr[row][col]>0)
matr[i+1][col]=matr[row][col];
for(int row=0;row<=i;row++){ //printing the matrix
for(int col=0;col<j;col++)
printf("%.2f ",matr[row][col]);
puts("\n");}
system("pause");
return 0;
}