With
fprintf(f,"%d %d %d\n",m,l,k);
I got
8 0 98
8 1 98
8 2 98
9 0 98
9 1 98
9 2 98
10 0 98
10 1 98
10 2 98
11 0 98
11 1 98
11 2 98
12 0 98
12 1 98
12 2 98
13 0 98
13 1 98
What I really want is that each line has same format,like this
9 2 98
10 0 98