C编写,输入一学生的生日(年:y0、月:m0、日:d0);输入当前的日期(年:y1、月:m1、日:d1);输出实足年龄.

2025-04-15 06:34:48
推荐回答(1个)
回答1:

#include
void main()
{
int y0,m0,d0;
int y1,m1,d1;
printf("please input the year month and date:");
scanf("%d%d%d",&y0,&m0,&d0);
printf("please input the time with now:");
scanf("%d%d%d",&y1,&m1,&d1);
printf("year with now is %dyear\t%dmonth\t%ddate\nthe input time is %dyear\t%dmonth\t%ddate\n",y1,m1,d1,y0,m0,d0);
printf("the age is %dold\n",y1-y0);
}

--------------------
怎么楼主用的是TC啊!我用的是VC6.0
C里本来就可以有中文!只是你的那个开发环境不允许!有机会可以试试VC哦!很不错的!