I tried using system(\"color 24\"); but that didn\'t change the color in the prompt. So after more Googling I saw SetConsoleTextAttribute and wrote
system(\"color 24\");
SetConsoleTextAttribute
Try to set the color before each output. You can do that in a function to avoid code duplication.