Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Project 1: Pattern Printing Write a MIPS program to print out a matrix of patter

ID: 667687 • Letter: P

Question

Project 1: Pattern Printing

Write a MIPS program to print out a matrix of pattern, based on the user’s input n.

a

b

c

d

e

f

g

b

c

d

*

f

g

a

c

d

*

*

*

a

b

d

*

*

*

*

*

c

e

f

*

*

*

c

d

f

g

a

*

c

d

e

g

a

b

c

d

e

f

Full grade (100/100):

Take a number n from the user (assuming the user always inputs an odd number for n), print out a matrix, but with a “diamond of *” in the middle of it.

I/O demonstrations (10%):

Include 5 screenshots on the running I/O of your program to show the behavior of your program. Be creative and thorough to cover all the representative cases

Implementation details For Level 1: (20%)

Describe your looping structure to print the matrix

How do you calculate which character print for a specific location - say (row 3, column 4), and (row 3, column 5)?

1. How did you decide how many, and where to put the *’s, for each row?

Additional notes

If you have implemented any additional features, provide a clear list with descriptions.

a

b

c

d

e

f

g

b

c

d

*

f

g

a

c

d

*

*

*

a

b

d

*

*

*

*

*

c

e

f

*

*

*

c

d

f

g

a

*

c

d

e

g

a

b

c

d

e

f

Explanation / Answer

Sample output

| a | b | c | d | e |

| b | c | * | e | a |

| c | * | * | * | b |

| d | e | * | b | c |

| e | a | b | c | d |