Thread: Need Help

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User dinjas's Avatar
    Join Date
    Feb 2005
    Location
    Vancouver, Washington
    Posts
    40
    Couple of things.. you should probably call week(string) after you scan the value using scanf
    then do something like:
    Code:
    if (!(strcmp(today, "Saturday") || !(strcmp(today, "Sunday")) {
       !!! then it's a weekend
    } else if(!strcmp(today, "Moday"...) {
       !!!...
    } else {
       !!! printerror
    }
    also think about what should happen if the user enters it in all caps, or with a lowercase first letter...
    Last edited by dinjas; 04-19-2008 at 10:03 PM. Reason: left off a paren
    straight off the heap

Popular pages Recent additions subscribe to a feed