Heading the right way on c matrix code? -


Then, those numbers are needed in the matrix form, I do not understand why I use the latline?

// Finally, this code should be taken from one square matrix and 2x2 to 6x6 / / plan to read it in a row, then get the number from the line, // then in the matrix form Print the number. That's the goal for today // I'll try to work the actual matrix part later

  #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; # Include & lt; Math.h> // Error list will be needed later on I think (from my notes) #define ENDOFFILE -1 # TOEFINE TOOMANYNUMS # 2 defined LIMIT 256 // declarations of int get_line (four line [], int) ; // main main () {four lines [255]; Integer number [6]; Printf ("Please input number% c:", line); Get_line (line, border); } // function int get_line (char s [], int lim) {int c, i; (I = 0; i & lt; lim-1 & amp; (C = getchar ())! = EOF & amp; c! = '\ N'; ++ i) S [i] = C; If (C == '\ n') {s [i] = c; ++ i; } S [i] = '\ 0'; Return i; Getline (char [], int) reads the characters from the Function Console:  

Getchar () And stores them in the array [] array [] point () in the function indicates on line similar to the array [] array.


Comments