Language: C++

#include<stdio.h>

void era_transformation(int year, int month, int day);

int main(void)
{
  int year, month, day;
  while(scanf("%d %d %d", &year, &month, &day) != EOF) {
  era_transformation(year, month, day);
  }
  return 0;
}

void era_transformation(int year, int month, int day)
{
  int date_number = year * 10000 + month * 100 + day;
  int meiji_number = 1868 * 10000 + 9 * 100 + 8;
  int taisho_number = 1912 * 10000 + 7 * 100 + 30;
  int showa_number = 1926 * 10000 + 12 * 100 + 25;
  int heisei_number = 1989 * 10000 + 1 * 100 + 8;
  if (date_number < meiji_number) {
      printf(”pre_meiji”);
  }
  else if (date_number < taisho_number) {
      printf(”meiji”);
      printf(” %d %d %d\n”, year - 1867, month, day);
  }
  else if (date_number < showa_number) {
      printf(”taisho”);
      printf(” %d %d %d\n”, year - 1911, month, day);
  }
  else if (date_number < heisei_number) {
      printf(”showa”);
      printf(” %d %d %d\n”, year - 1925, month, day);
  } else {
      printf(”heisei”);
      printf(” %d %d %d\n”, year - 1988, month, day);
  }
}

Compiler output:
a.cc:22:14: error: extended character ” is not valid in an identifier
   22 |       printf(”pre_meiji”);
      |              ^
a.cc:22:14: error: extended character ” is not valid in an identifier
a.cc:25:14: error: extended character ” is not valid in an identifier
   25 |       printf(”meiji”);
      |              ^
a.cc:25:14: error: extended character ” is not valid in an identifier
a.cc:26:14: error: extended character ” is not valid in an identifier
   26 |       printf(” %d %d %d\n”, year - 1867, month, day);
      |              ^
a.cc:26:24: error: stray '\' in program
   26 |       printf(” %d %d %d\n”, year - 1867, month, day);
      |                        ^
a.cc:26:25: error: extended character ” is not valid in an identifier
   26 |       printf(” %d %d %d\n”, year - 1867, month, day);
      |                         ^
a.cc:29:14: error: extended character ” is not valid in an identifier
   29 |       printf(”taisho”);
      |              ^
a.cc:29:14: error: extended character ” is not valid in an identifier
a.cc:30:14: error: extended character ” is not valid in an identifier
   30 |       printf(” %d %d %d\n”, year - 1911, month, day);
      |              ^
a.cc:30:24: error: stray '\' in program
   30 |       printf(” %d %d %d\n”, year - 1911, month, day);
      |                        ^
a.cc:30:25: error: extended character ” is not valid in an identifier
   30 |       printf(” %d %d %d\n”, year - 1911, month, day);
      |                         ^
a.cc:33:14: error: extended character ” is not valid in an identifier
   33 |       printf(”showa”);
      |              ^
a.cc:33:14: error: extended character ” is not valid in an identifier
a.cc:34:14: error: extended character ” is not valid in an identifier
   34 |       printf(” %d %d %d\n”, year - 1925, month, day);
      |              ^
a.cc:34:24: error: stray '\' in program
   34 |       printf(” %d %d %d\n”, year - 1925, month, day);
      |                        ^
a.cc:34:25: error: extended character ” is not valid in an identifier
   34 |       printf(” %d %d %d\n”, year - 1925, month, day);
      |                         ^
a.cc:36:14: error: extended character ” is not valid in an identifier
   36 |       printf(”heisei”);
      |              ^
a.cc:36:14: error: extended character ” is not valid in an identifier
a.cc:37:14: error: extended character ” is not valid in an identifier
   37 |       printf(” %d %d %d\n”, year - 1988, month, day);
      |              ^
a.cc:37:24: error: stray '\' in program
   37 |       printf(” %d %d %d\n”, year - 1988, month, day);
      |                        ^
a.cc:37:25: error: extended character ” is not valid in an identifier
   37 |       printf(” %d %d %d\n”, year - 1988, month, day);
      |                         ^
a.cc: In function 'void era_transformation(int, int, int)':
a.cc:22:14: error: '\U0000201dpre_meiji\U0000201d' was not declared in this scope
   22 |       printf(”pre_meiji”);
      |              ^~~~~~~~~~~
a.cc:25:14: error: '\U0000201dmeiji\U0000201d' was not declared in this scope
   25 |       printf(”meiji”);
      |              ^~~~~~~
a.cc:26:14: error: '\U0000201d' was not declared in this scope
   26 |       printf(” %d %d %d\n”, year - 1867, month, day);
      |              ^
a.cc:26:17: error: 'd' was not declared in this scope
   26 |       printf(” %d %d %d\n”, year - 1867, month, day);
      |                 ^
a.cc:29:14: error: '\U0000201dtaisho\U0000201d' was not declared in this scope
   29 |       printf(”taisho”);
      |              ^~~~~~~~
a.cc:30:14: error: '\U0000201d' was not declared in this scope
   30 |       printf(” %d %d %d\n”, year - 1911, month, day);
      |              ^
a.cc:30:17: error: 'd' was not declared in this scope
   30 |       printf(” %d %d %d\n”, year - 1911, month, day);
      |                 ^
a.cc:33:14: error: '\U0000201dshowa\U0000201d' was not declared in this scope
   33 |       printf(”showa”);
      |              ^~~~~~~
a.cc:34:14: error: '\U0000201d' was not declared in this scope
   34 |       printf(” %d %d %d\n”, year - 1925, month, day);
      |              ^
a.cc:34:17: error: 'd' was not declared in this scope
   34 |       printf(” %d %d %d\n”, year - 1925, month, day);
      |                 ^
a.cc:36:14: error: '\U0000201dheisei\U0000201d' was not declared in this scope
   36 |       printf(”heisei”);
      |              ^~~~~~~~
a.cc:37:14: error: '\U0000201d' was not declared in this scope
   37 |       printf(” %d %d %d\n”, year - 1988, month, day);
      |              ^
a.cc:37:17: error: 'd' was not declared in this scope
   37 |       printf(” %d %d %d\n”, year - 1988, month, day);
      |                 ^