printf 打印颜色

int main(void)
{
    printf("\033[31;1m haha\n");
    printf("\033[32;1m haha\n");
    printf("\033[33;1m haha\n");
    printf("\033[34;1m haha\n");
    printf("\033[35;1m haha\n");
    printf("\033[36;1m haha\n");
    printf("\033[37;1m haha\n");
    return 0;
}

 结果

 

posted @ 2020-06-25 14:27  goodluck14  阅读(473)  评论(0编辑  收藏  举报