h6ex4: File I/O, arrays, and loops
You cannot submit for this problem because the homework's deadline is due.
Description
Read two matrices \(A\) and \(B\) from a text file called matrices.txt
. Compute \(A + B\), \(A \cdot B\) and \(A^T \cdot B^T\). Output the result into a text file named result.txt
. Each row of a matrix is represented as a list of integers separated by a space. When the end of a row is reached a new one starts on the next line. Two matrices are separated by a blank line.
Format
Files
You should submit a tar file containing a c source file ex4.c
Input Files
two matrices in matrices.txt
with order \(n \leqslant 500\)
Output Files
the result in result.txt
Sample 1
Input: matrices.txt
-80 8
21 9
-63 -85
81 -44
Output: result.txt
-143 -77
102 -35
5688 6448
-594 -2181
3255 -7404
-1269 252
Limitation
1s, 32MiB for each test case #1 - #9.
2.5s, 32MiB for test case #10.
Assignment 6
- Status
- Finished
- Problems
- 6
- Open Since
- 2018-07-01 00:00
- DDL
- 2018-07-10 14:00
- Extension
- 240.0 hour(s)