Rotate image(n*n array)

sir what is the mistake in my code

sir i have not got any reply for this doubt since 24 min
so i asked again

Refer this: