I have an assignment to write a program that builds an array Usize determined by user inputs m,n.

the hangup is that the first element in each row or column is equal to the number of the row or column,and all the elements inside are to be the value of the sum of the element above and to the left its place.

So I get to the point where I get input for m,n. and I know how to build an array with nested loops, but i am confused about how to go abot the rest.

The hint the instructor gave was to use for and if....else if.... else loops.

Anyone have a bit of insight to share to get me off in the right direction?