Question: C# help with importing and exporting: So I have this program for class I need to write that requires me to use to text files

C# help with importing and exporting: So I have this program for class I need to write that requires me to use to text files that have matrices in them in row-major order.

For example, if the first two integer values are 3 3 then the first 3 values are the first row in the matrix. As an example, a 3x3 matrix:

[ 1 2 3 ] [4 5 6 ] [7 8 9 ]

The first two numbers in the text files tell me how many numbers and rows are in each (for which the first file is 15 by 17 and the other is 15 by 3).

Now I am not going to include the actual file because I do not want the program written for me (what would I learn if I did) but instead, I would like some help with how to import and read the two files (I never did understand how exactly this works). Then I need to "Write matrix A to a file named Matrix.outA. This should be a plain text file. You should also write this result to stdout (the screen)" does that mean to export it to a plain text file and the console screen or just to a plain text file? I need to do this with matrix b, and then do some vector math and a transpose, but if I understand what exactly to do for matrix A I can figure out the rest.

Thank you for any help you can provide for this project I am a little confused on.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!