there are any company name, its opening hours and days, for example,
ABC Corp. - Monday-Friday 10.00-18.00(or 10am-6pm)
how can i calculate in c the whole working hours of this company, if i`ve got function prototype int hours(char*)?
the result should be: ABC Corp. - 5(weekdays)*8(hours)+5(hours at weekends) = 45 hours
thanks for help
Parse it and return the hours, no one is here to do your homework for you.
Research, strtok, strstr and alike. Or even just sscanf()