Microsoft interview question

Write a function to print an array in a spiral.