Buonasera gente!! Da ieri che provo a completare un programmino in C per svolgere le operazioni di addizione, prodotto e prodotto scalare tra matrici. Vi preannuncio che non sono un'esperta, sono alle prime armi!! 
Il problema è che quando compilo non mi da errori, ma non lo esegue(usando dev c).
PS: Utilizzo il while anzichè il for perchè il mio professore pretende che sia così  
PSS: Grazie a chi avrà la pazienza di rispondere, ciaooo   
#include <stdio.h>
#include <stdlib.h>
//****************AZZERA MATRICI******************************
void azzera (int rows, int columns, int matrix[rows][columns]){
	int i = 0, j = 0;
	
	while(i < rows){
		j = 0;
		while(j < columns){
			matrix[i][j] = 0;
			j++;
		}
	i++;
	}
}
 //****************PRODOTTO SCALARE MATRICI*************************
void prod_scal_mtr( int rows, int columns, int matrix[rows][columns]){
	int i = 0, j = 0;
	int scalare;
	int mtr_scalare[rows][columns];
	azzera(rows, columns, mtr_scalare);
	
	printf("Insert the number to do scalar product");
	scanf("%d", &scalare);	
	
	while(i < rows){
		j = 0;
		while(j < columns){
			mtr_scalare[i][j]= matrix[i][j] * scalare;
			j++;
		}
		i++;
	}
}
//*********************PRODOTTO TRA MATRICI*******************************
void prod_mtr (int rows, int columns, int columns2, int matrix[rows][columns],int matrix1[columns][columns2]){
	int i = 0, j = 0, k = 0;
	int pr_mtr[rows][columns];
	int element, element1, pr;
	
	while(i < rows) {
		j = 0;
		while(j < columns) {
			pr_mtr[i][j] = 0;
			j++;
			
			while(k < columns) {
				pr_mtr[i][j] += matrix[i][k]+matrix[k][j];
				k++;
			}
		}
	i++;
	}
}
	
//*************************SOMMA TRA MATRICI**********************************
void sum_mtr ( int rows, int columns, int matrix[rows][columns], int matrix1[rows][columns]){
	
	int sum_mtr[rows][columns];
	int i = 0,  j = 0;
		
	while(i < rows){
		j = 0;
		while(j < columns){
			sum_mtr[i][j] = matrix[i][j] + matrix1[i][j];
			printf("[%d]",sum_mtr[i][j]);
			j++;
		}
		i++;
	}
}
//*****************************RIEMPI MATRICI********************
void fill_mtr (int rows, int columns, int matrix[rows][columns]){
	int i = 0;
	int j = 0;
	printf("Insert the elemets of your matrix");
	
	
	while(i < rows){
		j = 0;
		while(j < columns){
			printf("position [%d],[%d]",i,j);
			scanf("%d", &matrix[i][j]);
			j++;
			}
		i++;			
	}
}
int main() {	
	int rw1 = 0, col1 = 0, rw2 =0, col2 =0;
	
	
	do{
		printf("Insert the number of the rows of the first matrix");
		scanf("%d", &rw1);
		printf("Insert the number of the columns of the first matrix \n >>");
		scanf("%d", &col1);
	}while(rw1 < 1 || col1 < 1);
	
	int mtr1[rw1][col1];
	fill_mtr(rw1, col1, mtr1);
	
	do{
		printf("Insert the number of the rows \n >>");
		scanf("%d", &rw2);
		printf("Insert the number of the columns \n >>");
		scanf("%d", &col2);
	}while(rw2 < 1 ||col2 < 1);
	
	int mtr2[rw2][col2];
	fill_mtr(rw2, col2, mtr2);
	int summtr[rw1][col2];
	azzera(rw1, col1, summtr);;
	 
	if(rw1 == rw2 && col1 == col2){
		sum(rw1, col1, mtr1, mtr2);		
	}
	
	int prdmtr[rw1][col1];
	azzera(rw1, col1, prdmtr);
	if(rw1 == col2){
		prd_mtr(rw1, col1, rw2, mtr1, mtr2);
	}
	
	int prdsc[rw1][col1] ;
	prd_scal_mtr(rw1, col1, mtr1);
	return 0;
}