第三次作业

第一题

 

代码

char *a[12]={"January","February","March","April","May","June","July","August","September","October","November","December"}; 

char *getmonth( int n )

{

  int i;

  for(i=1;i<=12;i++)

  {

    if(i==n)

    {

      return a[i-1];

    }

  }

  return NULL;

  

}

posted on 2018-04-23 08:04  xuyibiao  阅读(75)  评论(0编辑  收藏  举报

导航