第1个回答 推荐于2017-09-26
写了一个简单的,没有考虑闰年
如果考虑闰年需要输入出生日期,进行计算。那就非常复杂了
有兴趣的可以在这个程序上扩展
#include "stdio.h"
void main()
{
int age = 0;
printf("Input your age:");
scanf("%d",&age);
if (age <= 0 || age >= 200)
{
printf("Your age is incorrect, please input again:");
scanf("%d",&age);
}
printf("Your age is:%d, and the days are :%d\n",age,age*365);
}本回答被提问者和网友采纳