getting incorrect output nested for loop

Printable View