Solved
In your program you store all results in the very same variable c, one iteration overwriting the value of the previous one. You have to collect the results in a matrix. Furthermore you were missing any initialization of c. I guessed that it should be initialized in the inner loop.
Hope this is something you looking:

Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

