Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- @author: Rahul Chatterjee
- @filename: matrix.c
- Diagonal matrix : Every off-diagonal entry is 0
- 3000
- 0000
- 0010
- 0009
- Identity Matrix: Every diagonal entry is 1, all other entries 0
- 1000
- 0100
- 0010
- 0001
- Lower triangular matrix: every super-diagonal entry is 0
- 3000
- 1000
- 2110
- 0479
- Upper triangular matrix: Every sub-diagonal entry is 0
- 3114
- 0261
- 0010
- 0009
- reads from standard input(redirected from input file), an n-by-n matrix, print the type. input file must have positive integer followed by n rows of integers. Exmaple input file contents:
- 4
- 3000
- 1000
- 2110
- 0479
- then
- ./matrix <infile
- should print
- lower triangular matrix
- */
Add Comment
Please, Sign In to add comment