One line answer for validation function
int validMonth(int mon, char* errmes){
return((mon>0 && mon <=12) || !strcpy(errmes, "Invalid month!"));
}
int validMonth(int mon, char* errmes){
return((mon>0 && mon <=12) || !strcpy(errmes, "Invalid month!"));
}
Congrats! Well Done!
ReplyDelete