#include <stdio.h>
#define CURRENTYEAR 2020
int main()
{
int yearBorn, age;
printf("What year were you born?/n");
scanf(" %d", &yearBorn);
if (yearBorn > CURRENTYEAR){
printf("wrong input!/n");
printf("What year were you born?/n");
scanf(" %d", &yearBorn);
}
age = CURRENTYEAR - yearBorn;
printf("/nSo this year you will turn %d on your birthday!/n",age);
if ((yearBorn % 4) == 0){
printf("/nYou were born in a Leap Year--cool!/n");
}
return 0;
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/266780.html