C言語なら俺に聞け! Part 76
レス数が950を超えています。1000を超えると書き込みができなくなります。
09751/2
NGNG(超文になってしまうので、要所要所ははしょってます)
#include "stdafx.h"
#include "stdio.h"
#include "string.h"
char *figure;
int allmonth;
int allday;
int main(int argc, char *argv[])
{
int keisan(char *);
printf("%d/%d は %d日目です。 \n",allmonth,allday,keisan(argv[1]));
}
int keisan(char *figure)
{
char *bundan;
bundan = strtok((char*)*figure,"/");
「月」入力文字数が多過ぎないか判定する文strlen();
bundan = strtok(NULL,"/");
「日」入力文字数が多過ぎないか判定する文strlen();
int month,day;
sscanf(figure,"%d/%d",&month,&day);
以下、システム秒を使い日付を求めたり、返り値をメイン文に返したりする文
}
レス数が950を超えています。1000を超えると書き込みができなくなります。