#include <stdio.h>
struct day{
int month;
int day;
}today = { 5,30 };
struct person{
char name[99];
int age;
struct day birthday;
};
void func(struct person His);
void printdata(const struct person His);
int main(void){
struct person ui = {"ui", 16,{ 5, 30}};
func(ui);
func(ui);
printdata(ui);
return 0;
}
void func(struct person His){
if(His.birthday.month==today.month && His.birthday.day==today.day)
His.age++;
today.day++;
}
void printdata(struct person His){
printf("今日は%d月%d日です\n", today.
month , today.
day ); printf("%sさんは%dさいです\n",His.
name,His.
age); }
I2luY2x1ZGUgPHN0ZGlvLmg+CgpzdHJ1Y3QgZGF5ewogIGludCBtb250aDsKICBpbnQgZGF5Owp9dG9kYXkgPSB7IDUsMzAgfTsKCnN0cnVjdCBwZXJzb257CiAgY2hhciBuYW1lWzk5XTsKICBpbnQgYWdlOwogIHN0cnVjdCBkYXkgYmlydGhkYXk7Cn07Cgp2b2lkIGZ1bmMoc3RydWN0IHBlcnNvbiBIaXMpOwp2b2lkIHByaW50ZGF0YShjb25zdCBzdHJ1Y3QgcGVyc29uIEhpcyk7CgppbnQgbWFpbih2b2lkKXsKICBzdHJ1Y3QgcGVyc29uIHVpID0geyJ1aSIsIDE2LHsgNSwgMzB9fTsKCiAgZnVuYyh1aSk7CiAgZnVuYyh1aSk7CgogIHByaW50ZGF0YSh1aSk7CgogIHJldHVybiAwOwp9Cgp2b2lkIGZ1bmMoc3RydWN0IHBlcnNvbiBIaXMpewogIGlmKEhpcy5iaXJ0aGRheS5tb250aD09dG9kYXkubW9udGggJiYgSGlzLmJpcnRoZGF5LmRheT09dG9kYXkuZGF5KQogICAgSGlzLmFnZSsrOwogIHRvZGF5LmRheSsrOwp9CnZvaWQgcHJpbnRkYXRhKHN0cnVjdCBwZXJzb24gSGlzKXsKICBwcmludGYoIuS7iuaXpeOBryVk5pyIJWTml6XjgafjgZlcbiIsIHRvZGF5Lm1vbnRoICwgdG9kYXkuZGF5ICk7CiAgcHJpbnRmKCIlc+OBleOCk+OBryVk44GV44GE44Gn44GZXG4iLEhpcy5uYW1lLEhpcy5hZ2UpOwp9