ぼるじょあがC/C++の宿題を片づけますYO! 68代目
at TECH
677:homoじょあ ◆5OLf4yFnuM
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;
}
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
4348日前に更新/401 KB
担当:undef