07/12/18 00:22:29
>>672
(・3・) エェー 関数だけ作ってみた
int preceedp(struct sdate d1, struct sdate d2){
if(d1.year < d2.year){
return 1;
}else if(d1.year == d2.year){
if(d1.month < d2.month){
return 1;
}else if(d1.month == d2.month){
if(d1.day < d2.day){
return 1;
}
}
}
return 0;
}
int succeedp(struct sdate d1, struct sdate d2){
return preceedp(d2, d1);
}
int samedayp(struct sdate d1, struct sdate d2){
if(d1.year == d2.year && d1.month == d2.month && d1.day == d2.day)return 1;
return 0;
}
int compdate(struct sdate d1, struct sdate d2){
if(samedayp(d1, d2))return 0;
if(preceedp(d1, d2))return 1;
return -1;
}