首页 > 代码库 > 推断一周的某一天的函数接口
推断一周的某一天的函数接口
#define ret_ok 0
#define ret_err 1
char week_day[8] = {"Monday","Tuesday","Wedsday","Thursday","Friday","Saturday","Sunday"};
int Judge_day_of_the_week(int week_num,char *result_week_day)
{
if( week_num < 1 || week_num > 7 )
{
printf("Your input is error\n");
return ret_err;
}
else
{
*result_week_day = week_day[week_num-1];
}
return ret_ok;
}
推断一周的某一天的函数接口
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。