Remove the switch case. It just makes things more difficult.
You'll need two nested for loops. The outer one will range from 0 to < MaxRows. The inner for loop is for the columns in one row, and will range from 0 to < MaxCols.
One or two if statements inside the inner for loop, will give the logic needed to either print a char (putchar('*'), or print a blank char (putchar(' ').
It's very helpful to see the logical steps needed, if you do it several times by hand, with tree's of different sizes, with paper and pencil first. Keep your code as simple as possible. Simple is good!
Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...