Couple of things.. you should probably call week(string) after you scan the value using scanf
then do something like:
also think about what should happen if the user enters it in all caps, or with a lowercase first letter...Code:if (!(strcmp(today, "Saturday") || !(strcmp(today, "Sunday")) { !!! then it's a weekend } else if(!strcmp(today, "Moday"...) { !!!... } else { !!! printerror }