不知道哪里错了?c语言
#include<stdio.h>
void main()
{void date(int ,int ,int );
int year,month,day;
printf("请输入年份:");
scanf("%d",&year);
printf("请输入月份:");
scanf("%d",&month);
printf("请输入日:");
scanf("%d",&day);
date(year,month,day);}
void date(int ,int ,int )
{int dat,year,month,day,leap;
if(year%4==0&&year%100!=0)leap=1;
else if(year%400==0)leap=1;
else leap=0;
{if(leap==1)
{if(month==1) dat=day;
else if(month==2) dat=31+day;
else if(month==3) dat=31+29+day;
else if(month==4) dat=31+29+31+day;
else if(month==5) dat=31+29+31+30+day;
else if(month==6) dat=31+29+31+30+31+day;
else if(month==7) dat=31+29+31+30+31+30+day;
else if(month==8) dat=31+29+31+30+31+30+31+day;
else if(month==9) dat=31+29+31+30+31+30+31+31+day;
else if(month==10) dat=31+29+31+30+31+30+31+31+30+day;
else if(month==11) dat=31+29+31+30+31+30+31+31+30+31+day;
else if(month==12) dat=31+29+31+30+31+30+31+31+30+31+30+day;}
else
{if(month==1) dat=day;
else if(month==2) dat=31+day;
else if(month==3) dat=31+28+day;
else if(month==4) dat=31+28+31+day;
else if(month==5) dat=31+28+31+30+day;
else if(month==6) dat=31+28+31+30+31+day;
else if(month==7) dat=31+28+31+30+31+30+day;
else if(month==8) dat=31+28+31+30+31+30+31+day;
else if(month==9) dat=31+28+31+30+31+30+31+31+day;
else if(month==10) dat=31+28+31+30+31+30+31+31+30+day;
else if(month==11) dat=31+28+31+30+31+30+31+31+30+31+day;
else if(month==12) dat=31+28+31+30+31+30+31+31+30+31+30+day;}}
printf("此日是第%d天\n",dat);}
小小世衫孝修改如下
void date(int year,int month,int day)//通过形参搜稿传递到塌闷函数
{int dat,leap;