>数字は右揃えでお願いします。
らしいので
 printf("a[%d] = %d\n", i, a[i]);
より
 printf("a[%2d] = %d\n", i, a[i]);

※ 実例の右辺 左揃えだけど… そっちも右に揃えるのかな?