I want to set two different colors for main and add function. But in this way, when add function is executed whole output text color turning into red.
#include<stdio.h>
#include<windows.h>
int add(a,b){
system("Color 4");
printf("the sum of two numbers %d",a+b);
}
int main(){
int a,b;
system("Color A");
printf("\nEnter two numbers\n");
scanf("%d %d",&a,&b);
add(a,b);
return 0;
}