Matrix display in C
Solved
ma3reft
Posted messages
15
Status
Member
-
Anonymous user -
Anonymous user -
Hello,
Here is the translation of the provided text into English:
Hello,
I’m programming in C under Dev-C++ and I’d like to display a tabulated matrix in proper form. For example I want to display: matrix[2][3] = {{1,3,8},{5,6,9}}.
I write:
for(i=0,i++,i<2) for(j=0,j++,j<3){ printf("%d /t",matrix[i][j]); }
I get displayed: 1 3 8 5 6 9
What I want to display is: 1 3 8 on one line and 5 6 9 on the following line.
How to do? I’m counting on your precious help..thanks in advance :)
Configuration: Windows Vista
Safari 532.0
Here is the translation of the provided text into English:
Hello,
I’m programming in C under Dev-C++ and I’d like to display a tabulated matrix in proper form. For example I want to display: matrix[2][3] = {{1,3,8},{5,6,9}}.
I write:
for(i=0,i++,i<2) for(j=0,j++,j<3){ printf("%d /t",matrix[i][j]); }
I get displayed: 1 3 8 5 6 9
What I want to display is: 1 3 8 on one line and 5 6 9 on the following line.
How to do? I’m counting on your precious help..thanks in advance :)
Configuration: Windows Vista
Safari 532.0
printf(j<n-1?"\t":"\n");
and thanks