首页 > 其他 > 详细

判断一周的某一天的函数接口

时间:2015-08-11 01:26:09      阅读:162      评论:0      收藏:0      [点我收藏+]
#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;
}

版权声明:本文为博主原创文章,未经博主允许不得转载。

判断一周的某一天的函数接口

原文:http://blog.csdn.net/u014100559/article/details/47406543

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!