Question
Create a C (NOT C++) program as follows: 1. Ask the user for the name of a file, read the name of the file from
Create a C (NOT C++) program as follows:
1. Ask the user for the name of a file, read the name of the file from standard input. The first row of the file contains the number of rows and columns in the file. The remainder of the file is expected to contain a matrix of numbers in the form of multiple lines of space or tab delimited numbers. Examples are provided below. For this project, no valid input file shall have more then 20 rows or 20 columns.
2. Read the contents of the file and determine if the matrix of numbers exhibits vertical additive symmetry. The definition of this term is provided below.
3. If the matrix of numbers in the file exhibits vertical additive symmetry, output vertical additive symmetry to standard output. Otherwise, output no vertical additive symmetry to standard output.
4. Print each row of the matrix in descending order, one row per line of output, with each number separated by a space.
Definition of vertical additive symmetry: A matrix of numbers is defined to exhibit vertical additive symmetry if the sum of the numbers in the columns of the matrix exhibits vertical symmetry.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started