洛谷 SPOJ 题解 SP1 【TEST - Life, the Universe, and Everything】

给出一种主函数递归的方法(其实主函数 main() 也是可以递归的)

#include <stdio.h>

int main()
{
    int a;
    scanf("%d", &a);
    if (a != 42) {
        printf("%d\n", a);
        main();
    }
    return 0;
}
posted @ 2018-11-02 14:15  航空信奥  阅读(190)  评论(0编辑  收藏  举报