//past
    for (int i = 0; i < N - 1; i++)
        printf("%d ", a[i]);
    printf("%d\n", a[N - 1]);

    //now
    for (int i = 0; i < N; i++)
        printf("%d%c", a[i], (i < N - 1) ? ' ' : '\n');

the latter one is apparently more elegent than the former one in manifestation,which is surely slower in execution...

posted on 2013-04-03 00:19  Sinker  阅读(109)  评论(0编辑  收藏  举报