请问大神函数引用的相关问题,帮忙修改一下代码
程序代码:
#include<stdio.h> int main() { int day; int day_of_year(2012,5,12); printf("%d\n",day); return 0; } int day_of_year(int year,int month,int day) { int k,leap;//数组初始化 int tab[2][13]={{0,31,29,31,30,31,30,31,31,30,31,30,31}, {0,31,29,31,30,31,30,31,31,30,31,30,31}}; //判断闰年 leap=(year%4==0&&year%100!=0||year%400==0); //计算天数 for(k=1;k<month;k++) day=day+tab[leap][k]; return day; }就这个 请大神看下