Looks like an error in the given algorithm unless the language automatically initializes all new variables to zero (or some other specified value).
If not defining j was an oversight on the question composer's part then you might state some assumed value for it and proceed to solve the problem using that value.