first commit

master
unknown 6 years ago
commit 073453f59e

@ -0,0 +1,40 @@
#include <stdio.h>
int Y(int A)
{
int i,s=0,day;
for(i=1;i<=A-1;i++)
{
if(i%4==0&&i%100!=0||i%400==0)
day=366;
else
day=365;
s=s+day;
}
return s;
}
int R(int B,int C)
{
int T;
switch(C)
{
case 1: T=31;break;
case 2:
if(B%4==0&&B%100!=0||B%400==0)
T=29;
else
T=28;
break;
case 3: T=31;break;
case 4: T=30;break;
case 5: T=31;break;
case 6: T=30;break;
case 7: T=31;break;
case 8: T=31;break;
case 9: T=30;break;
case 10: T=31;break;
case 11: T=30;break;
case 12: T=31;break;
}
return T;
}
Loading…
Cancel
Save