int year = 2002;
char a[255];
if (year - 1988 > 0)
 printf("平成%d年\n",year - 1988);
else if (year - 1925 > 0)
 printf("昭和%d年\n", year - 1925);