Assignment 02 solution

$35.00 $24.00

The following explains a direction that you need to follow to provide the output of your program First, place the following in a file and call that file “file1.txt” 2 3              4              5              6 7              8              9              10           11           12 13           14           15           16           17           18 19           20           21           22           23           24 25           26           27          …

You’ll get a: . zip file solution

 

 
Categorys:

Description

5/5 – (2 votes)

The following explains a direction that you need to follow to provide the output of your program

  • First, place the following in a file and call that file “file1.txt”
  • 2 3              4              5              6

7              8              9              10           11           12

13           14           15           16           17           18

19           20           21           22           23           24

25           26           27           28           29           30

31           32           33           34           35           36

 

  • First, place the following in a file and call that file “file2.txt”
  • 200         30           40           50           60

70           80           90           100         110         120

130         140         150         160         170         180

190         200         210         22           230         240

250         260         270         28           290         300

310         320         330         34           350         360

 

 

Now run your program and you should see the following on the screen. Note that anything that is shown in red is what you need to enter as input to your program. Anything shown in blue is what your program prints on the screen as soon as the program starts. Now run the program and provide the input

 

>> Enter the dimension of your matrix: 2

Error: ***** This dimension is out of bound. The program stops in here.

(************************************End of the Program *******************************)

Now re-execute your code and you should see the following

>> Enter the dimension of your matrix: 7

Error: ***** We can only handle up to 6 dimension at this time. The program stops in here.

(************************************End of the Program *******************************)

Again re-execute your code and you should see the following

>> Enter the dimension of your matrix: 5

====================================================================================

The content of the first matrix is:

<print the content – tab delimited>

 

====================================================================================

The content of the second matrix is:

<print the content – tab delimited>

 

====================================================================================

The product of the two matrices is:

<print the result – tab delimited>

 

====================================================================================

The dot-product of the two matrices is:

<print the result – tab delimited>

 

====================================================================================

The result of matrix1 divided by matrix2 is:

<print the result – tab delimited>

 

====================================================================================

The transpose of the first matrix is:

<print the result – tab delimited>

 

====================================================================================

The transpose of the second matrix is:

<print the result – tab delimited>

 

====================================================================================

The product of the transpose of the two matrices is:

<print the result – tab delimited>

 

====================================================================================

The dot product of the transpose of the two matrices is:

<print the result – tab delimited>

 

====================================================================================

The result of matrix1 divided by matrix2 is:

<print the result – tab delimited>

 

====================================================================================

 

 

 (************************************End of the Program *******************************)

 

 

 

 

Now change the content of the second matrix as follows (the changes are shown in the highlighted area) and run the program again as directed above. The only change is setting up the dimension to be equal to 4:

 

  • 20           30           40           50           60

70           80           90           100         110         120

130         140         150         160         170         180

190         200           0            22           230         240

250         260         270         28           290         300

  0            320         330         34           350         360