reset password
Author Message
sidguttula
Posts: 16
Posted 15:07 May 30, 2016 |

For this problem, I am able to print out an nxn array with no problem, for an nxm array I am able to print it out but it keeps giving me zeroes for the last column every time I run it. For the mxn array, it gives me an error every time I run it. 

How do I fix this?

kknaur
Posts: 540
Posted 15:48 May 30, 2016 |

Be sure that your loops which iterate over the array are terminated correctly.  You might be starting from the wrong starting value, or you might be ending at the wrong ending value.  Hand trace your loops with a small array and see what happens.