New course! Every coder should learn Generative AI!
Try a free lesson+ 1
In 2nd for loop change i to j.
Explaination:
In first for loop you have defined int i
again in 2nd loop you are defining same variable name i.
Change the variable name and your issue will be resolved.