Ask simple questions about arrays~~thinks~~

Thinks! I solved the question_2 that doesn’t make an error about inaccessible code!
But how can I make this code output different values according to the progression of n or i? :smiling_face_with_three_hearts: :smiling_face_with_three_hearts: