So, in one of my programs I have to ask the user to type in a month, and I was wondering how I can compare all the twelve months with what the user typed in. i.e. User types in: "JaNuAry", how would I compare the strings with a regular "January" and other ways to type it, also with all the other 11 months?
I was thinking something with a struc, so I can get the days in there and so that the days can't exceed beyond 31, except for February. And also using a switch case, so I can test them all out, but I have no idea how to compare both the strings from the user and from the code, and how to do it in a switch case, if possible, if there is a easier way, please let me know. Thanks a bunch![]()



LinkBack URL
About LinkBacks




