Verifying column and line counts
You should provide a compiling code. I'll assume that n and m are int, but you should have added their declaration.


You should use explicit names for variables. n is a line count, so call it line_count. m is column_count.
You should check the return values of scanf to be sure you handle gracefully EOF and bad input.
You print "Error, number of colums/ligns &lt; 1. \n" every time, so the user can't know if it's the lines or the columns or both that are &lt; 1.
The english word is "lines", not "ligns".
Your checks are too complicated and redundants. The entire if/else block can be replaced by this:

while(*line_count &lt; 1)
{
    printf("Error, number of lines &lt; 1. \n");
    scanf("%d", line_count);
}


while(*column_count &lt; 1)
{
    printf("Error, number of colums &lt; 1. \n");
    scanf("%d", column_count);
}

printf("Number of lines : %x, Number of columns : %x \n", *line_count, *column_count);