谁知道这段程序有什么问题吗
输入一名学生的生日和当前日期 输出该学生的实际年龄#include"stdio.h"
void main()
{
int y1,y2,m1,m2,d1,d2,year;
printf("请输入你的生日和现在的日期\n");
scanf("y1=%d,m1=%d,d1=%d,y2=%d,m2=%d,d2=%d",&y1,&m1,&d1,&y2,&m2,&d2);
if(m2>m1)
{
year=y2-y1;
printf("year=%d\n",year);
}
if(m1=m2&&d2>=d1)
{
year=y2-y1;
printf("year=%d\n",year);
}
if(m2<m1)
{
year=y2-y1-1;
printf("year=%d\n",year);
}
if(m2=m1&&d2<d1)
{
year=y2-y1-1;
printf("year=%d\n",year);
}
}