My assignment code for array print