第几天那个代码模板可以保存起来。
#include<stdio.h>
#include<math.h>
#define PI 3.1415927
using namespace std;
int main()
{
int year,month,day;
char a,b,d;
while(scanf("%d%c%d%c%d%c",&year,&a,&month,&b,&day,&d)!=EOF)
{
switch(month)
{
case :
day=day;
break;
case :
day=+day;
break;
case :
day=++day;
break;
case :
day=+++day;
break;
case :
day=++++day;
break;
case :
day=+++++day;
break;
case :
day=++++++day;
break;
case :
day=+++++++day;
break;
case :
day=++++++++day;
break;
case :
day=+++++++++day;
break;
case :
day=++++++++++day;
break;
default:
day=+++++++++++day;
}
if(month>)
{
if(year%==)
{
if(year%==)
{
day=day+;
printf("%d\n",day);
}
else
{
printf("%d\n",day);
}
}
else
{
if(year%==)
{
day=day+;
printf("%d\n",day);
}
else
{
printf("%d\n",day);
}
}
}
else
printf("%d\n",day);
}
}