home *** CD-ROM | disk | FTP | other *** search
- static char *sccsid = "@(#)m_read.c 4/6/82 (U of Maryland, FLB)";
-
- #include <stdio.h>
- #include "mat.h"
-
- struct matrix *
- m_read()
- {
- register struct matrix *result;
- register int row, col;
- int rows, cols;
-
- scanf("%d%d", &rows, &cols);
- m_create(result, rows, cols);
-
- for (row = 0; row < rows; row++)
- for (col = 0; col < cols; col++)
- scanf("%lf", &m_v(result, row, col));
-
- return(result);
- }