怎么要求输入年月日输出地几天还差什么????????
(Y年 M月 D天)
#include<stdio.h>
int month[12]={31,28,31,30,31,30,31,31,30,31,30,31} ;
int main()
{
   int Y,M,D,i,total;
   scanf("%d %d %d",&Y,&M,&D);
   if(Y%4!=0&&Y%100==!0)
   for (i=0;i<=M-1;i++)
    total=month[i]+month[i-1]+D;
    else if((Y%4==0&&Y%100==0)||Y%400==0)
   {
      if(M==1)
      printf("total=%d",total);
      if(M==2)
      total=31+D;
      printf("total=%d",total) ;
      if(M>=3)
      for(i=3;i<=M-1;i++)
      total=month[0]+month[1]+month[i-1]+D+1;
      printf("total=%d",total);
   }
   getch ();
   return 0;
}



 
											





 
	    

 
	

 不好意思有点小错,
不好意思有点小错,