Language: C++

#include <stdio.h>


const int year[4] = {1868, 1912, 1926, 1989};
const int month[4] = {9, 7, 12, 1};
const int day[4] = {8, 30, 25, 8};
const char gengou[5] = {'p', 'm', 't', 's', 'h'};//??????pre-meiji, meiji, taisyou, syowa, heisei??¨??????

char gengouka (int inputyear, int inputmonth, int inputday)
{
    int i;
    char y;//y?????????????????????????????????
    for (i = 0; i < 3; ++i) {
        if (inputyear == year[i]) {//?¢?????????´?????¨????????????
            if (inputmonth == month[i]) {
                if (inputday < day[i]) {
                    y = gengou[i];
                    break;
                } else {
                    y = gengou[i + 1];
                    break;
                } 
            } else if (inputmonth < month[i]) {
                y = gengou[i];
                break;
            } else {
                y = gengou[i + 1];
                break;
            }
            break;
        } else if (inputyear < year[i]) {
            y = gengou[i]; 
            break;
        } 
        if (inputyear > year[3]) {//???????????????????????§??????
            y = gengou[4];
            break;
        }
    }
    return y;
}

int main(void) 
{
    int inputyear, inputmonth, inputday, outputyear;
????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
        char y = gengouka(inputyear, inputmonth, inputday);
        if (y == 'p') {
            printf("pre-meiji\n");
        } else if (y == 'm') {
            outputyear = inputyear - year[0] + 1;
            printf("meiji %d %d %d\n", outputyear, inputmonth, inputday);
        } else if (y == 't') {
            outputyear = inputyear - year[1] + 1;
            printf("taisho %d %d %d\n", outputyear, inputmonth, inputday); 
        } else if (y == 's') {
            outputyear = inputyear - year[2] + 1;
            printf("syowa %d %d %d\n", outputyear, inputmonth, inputday);
        } else {
            outputyear = inputyear - year[3] + 1;
            printf("heisei %d %d %d\n", outputyear, inputmonth, inputday);
        }
    } 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:1: error: expected primary-expression before '?' token
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      | ^
a.cc:46:2: error: expected primary-expression before '?' token
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |  ^
a.cc:46:3: error: expected primary-expression before '?' token
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |   ^
a.cc:46:4: error: expected primary-expression before '?' token
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |    ^
a.cc:46:5: error: expected primary-expression before '?' token
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |     ^
a.cc:46:6: error: expected primary-expression before '?' token
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |      ^
a.cc:46:7: error: expected primary-expression before '?' token
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |       ^
a.cc:46:8: error: expected primary-expression before '?' token
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |        ^
a.cc:46:9: error: expected primary-expression before '?' token
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |         ^
a.cc:46:10: error: expected primary-expression before '?' token
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |          ^
a.cc:46:11: error: expected primary-expression before '?' token
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |           ^
a.cc:46:12: error: expected primary-expression before '?' token
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |            ^
a.cc:46:13: error: expected primary-expression before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
a.cc:46:13: error: expected ':' before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
      |             :
a.cc:46:13: error: expected primary-expression before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
a.cc:46:13: error: expected ':' before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
      |             :
a.cc:46:13: error: expected primary-expression before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
a.cc:46:13: error: expected ':' before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
      |             :
a.cc:46:13: error: expected primary-expression before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
a.cc:46:13: error: expected ':' before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
      |             :
a.cc:46:13: error: expected primary-expression before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
a.cc:46:13: error: expected ':' before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
      |             :
a.cc:46:13: error: expected primary-expression before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
a.cc:46:13: error: expected ':' before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
      |             :
a.cc:46:13: error: expected primary-expression before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
a.cc:46:13: error: expected ':' before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
      |             :
a.cc:46:13: error: expected primary-expression before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
a.cc:46:13: error: expected ':' before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
      |             :
a.cc:46:13: error: expected primary-expression before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
a.cc:46:13: error: expected ':' before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
      |             :
a.cc:46:13: error: expected primary-expression before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
a.cc:46:13: error: expected ':' before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
      |             :
a.cc:46:13: error: expected primary-expression before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
a.cc:46:13: error: expected ':' before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
      |             :
a.cc:46:13: error: expected primary-expression before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
a.cc:46:13: error: expected ':' before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~
      |             :
a.cc:46:13: error: expected primary-expression before 'while'
   46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
      |             ^~~~~