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(''&#157;pre_meiji'');
  }
  else if (date_number < taisho_number) {
      printf(''meiji'');
      printf('' %d %d %d\n''&#157;, year - 1867, month, day);
  }
  else if (date_number < showa_number) {
      printf(''taisho'');
      printf('' %d %d %d\n''&#157;, year - 1911, month, day);
  }
  else if (date_number < heisei_number) {
      printf(''&#157;showa''&#157;);
      printf(''&#157; %d %d %d\n'', year - 1925, month, day);
  } else {
      printf(''&#157;heisei'');
      printf(''&#157; %d %d %d\n''&#157;, year - 1988, month, day);
  }
}

Compiler output:
a.cc:22:14: error: empty character constant
   22 |       printf(''&#157;pre_meiji'');
      |              ^~
a.cc:22:17: error: stray '#' in program
   22 |       printf(''&#157;pre_meiji'');
      |                 ^
a.cc:22:31: error: empty character constant
   22 |       printf(''&#157;pre_meiji'');
      |                               ^~
a.cc:25:14: error: empty character constant
   25 |       printf(''meiji'');
      |              ^~~~~~~
a.cc:25:21: error: empty character constant
   25 |       printf(''meiji'');
      |                     ^~
a.cc:26:14: error: empty character constant
   26 |       printf('' %d %d %d\n''&#157;, year - 1867, month, day);
      |              ^~
a.cc:26:25: error: stray '\' in program
   26 |       printf('' %d %d %d\n''&#157;, year - 1867, month, day);
      |                         ^
a.cc:26:27: error: empty character constant
   26 |       printf('' %d %d %d\n''&#157;, year - 1867, month, day);
      |                           ^~
a.cc:26:30: error: stray '#' in program
   26 |       printf('' %d %d %d\n''&#157;, year - 1867, month, day);
      |                              ^
a.cc:29:14: error: empty character constant
   29 |       printf(''taisho'');
      |              ^~~~~~~~
a.cc:29:22: error: empty character constant
   29 |       printf(''taisho'');
      |                      ^~
a.cc:30:14: error: empty character constant
   30 |       printf('' %d %d %d\n''&#157;, year - 1911, month, day);
      |              ^~
a.cc:30:25: error: stray '\' in program
   30 |       printf('' %d %d %d\n''&#157;, year - 1911, month, day);
      |                         ^
a.cc:30:27: error: empty character constant
   30 |       printf('' %d %d %d\n''&#157;, year - 1911, month, day);
      |                           ^~
a.cc:30:30: error: stray '#' in program
   30 |       printf('' %d %d %d\n''&#157;, year - 1911, month, day);
      |                              ^
a.cc:33:14: error: empty character constant
   33 |       printf(''&#157;showa''&#157;);
      |              ^~
a.cc:33:17: error: stray '#' in program
   33 |       printf(''&#157;showa''&#157;);
      |                 ^
a.cc:33:27: error: empty character constant
   33 |       printf(''&#157;showa''&#157;);
      |                           ^~
a.cc:33:30: error: stray '#' in program
   33 |       printf(''&#157;showa''&#157;);
      |                              ^
a.cc:34:14: error: empty character constant
   34 |       printf(''&#157; %d %d %d\n'', year - 1925, month, day);
      |              ^~
a.cc:34:17: error: stray '#' in program
   34 |       printf(''&#157; %d %d %d\n'', year - 1925, month, day);
      |                 ^
a.cc:34:31: error: stray '\' in program
   34 |       printf(''&#157; %d %d %d\n'', year - 1925, month, day);
      |                               ^
a.cc:34:33: error: empty character constant
   34 |       printf(''&#157; %d %d %d\n'', year - 1925, month, day);
      |                                 ^~
a.cc:36:14: error: empty character constant
   36 |       printf(''&#157;heisei'');
      |              ^~
a.cc:36:17: error: stray '#' in program
   36 |       printf(''&#157;heisei'');
      |                 ^
a.cc:36:28: error: empty character constant
   36 |       printf(''&#157;heisei'');
      |                            ^~
a.cc:37:14: error: empty character constant
   37 |       printf(''&#157; %d %d %d\n''&#157;, year - 1988, month, day);
      |              ^~
a.cc:37:17: error: stray '#' in program
   37 |       printf(''&#157; %d %d %d\n''&#157;, year - 1988, month, day);
      |                 ^
a.cc:37:31: error: stray '\' in program
   37 |       printf(''&#157; %d %d %d\n''&#157;, year - 1988, month, day);
      |                               ^
a.cc:37:33: error: empty character constant
   37 |       printf(''&#157; %d %d %d\n''&#157;, year - 1988, month, day);
      |                                 ^~
a.cc:37:36: error: stray '#' in program
   37 |       printf(''&#157; %d %d %d\n''&#157;, year - 1988, month, day);
      |                                    ^
a.cc: In function 'void era_transformation(int, int, int)':
a.cc:22:21: error: expected ')' before ';' token
   22 |       printf(''&#157;pre_meiji'');
      |             ~       ^
      |                     )
a.cc:22:22: error: 'pre_meiji' was not declared in this scope
   22 |       printf(''&#157;pre_meiji'');
      |                      ^~~~~~~~~
a.cc:25:14: error: unable to find character literal operator 'operator""meiji' with 'char' argument
   25 |       printf(''meiji'');
      |              ^~~~~~~
a.cc:26:18: error: 'd' was not declared in this scope
   26 |       printf('' %d %d %d\n''&#157;, year - 1867, month, day);
      |                  ^
a.cc:26:35: error: expected primary-expression before ',' token
   26 |       printf('' %d %d %d\n''&#157;, year - 1867, month, day);
      |                                   ^
a.cc:29:14: error: unable to find character literal operator 'operator""taisho' with 'char' argument
   29 |       printf(''taisho'');
      |              ^~~~~~~~
a.cc:30:18: error: 'd' was not declared in this scope
   30 |       printf('' %d %d %d\n''&#157;, year - 1911, month, day);
      |                  ^
a.cc:30:35: error: expected primary-expression before ',' token
   30 |       printf('' %d %d %d\n''&#157;, year - 1911, month, day);
      |                                   ^
a.cc:33:21: error: expected ')' before ';' token
   33 |       printf(''&#157;showa''&#157;);
      |             ~       ^
      |                     )
a.cc:33:22: error: 'showa' was not declared in this scope
   33 |       printf(''&#157;showa''&#157;);
      |                      ^~~~~
a.cc:33:35: error: expected primary-expression before ')' token
   33 |       printf(''&#157;showa''&#157;);
      |                                   ^
a.cc:34:21: error: expected ')' before ';' token
   34 |       printf(''&#157; %d %d %d\n'', year - 1925, month, day);
      |             ~       ^
      |                     )
a.cc:34:23: error: expected primary-expression before '%' token
   34 |       printf(''&#157; %d %d %d\n'', year - 1925, month, day);
      |                       ^
a.cc:34:24: error: 'd' was not declared in this scope
   34 |       printf(''&#157; %d %d %d\n'', year - 1925, month, day);
      |                        ^
a.cc:36:21: error: expected ')' before ';' token
   36 |       printf(''&#157;heisei'');
      |             ~       ^
      |                     )
a.cc:36:22: error: 'heisei' was not declared in this scope
   36 |       printf(''&#157;heisei'');
      |                      ^~~~~~
a.cc:37:21: error: expected ')' before ';' token
   37 |       printf(''&#157; %d %d %d\n''&#157;, year - 1988, month, day);
      |             ~       ^
      |                     )
a.cc:37:23: error: expected primary-expression before '%' token
   37 |       printf(''&#157; %d %d %d\n''&#157;, year - 1988, month, day);
      |                       ^
a.cc:37:24: error: 'd' was not declared in this scope
   37 |       printf(''&#157; %d %d %d\n''&#157;, year - 1988, month, day);
      |                        ^
a.cc:37:41: error: expected primary-expression before ',' token
   37 |       printf(''&#157; %d %d %d\n''&#157;, year - 1988, month, day);
      |                                         ^