【C笔记】打印不同的颜色字体

#include <stdio.h>

int main() {
    printf("\033[31m"); // Set text color to red
    printf("This text will be in red color\n");
    printf("\033[0m");  // Reset text color to default
    printf("This text will be in default color\n");
    return 0;
}

评论