criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <bits/stdc++.h>

int main(){
  int N;
  cin >> N;
  N %= 10;
  if(N == 0 || N == 1 || N == 6 || N ==8)
    cout << "pon";
  else if(N == 3)
    cout << "bon";
  else
    cout << "hon";
    
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> N;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout << "pon";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     cout << "bon";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     cout << "hon";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
ll a;
cin>>a;
  ll b;
  b=a%10;
  if(b==3) cout<<"bon";
else if(b==0 || b==1 || b==6 || b==8) cout<<"pon";
  else cout<<"hon";
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'll' was not declared in this scope
    5 | ll a;
      | ^~
a.cc:6:6: error: 'a' was not declared in this scope
    6 | cin>>a;
      |      ^
a.cc:7:5: error: expected ';' before 'b'
    7 |   ll b;
      |     ^~
      |     ;
a.cc:8:3: error: 'b' was not declared in this scope
    8 |   b=a%10;
      |   ^
Language: Java

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String ans = "hon";
        switch (n % 10) {
            case 0:
            case 1:
            case 6:
            case 8:
                ans = "pon";
                break;
            case 3:
                ans = "bon";
                break;
        }
        System.out.println(ans);
        sc.close();
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include<iostream>
#include <bits/stdc++.h>
using namespace std;

int main() {
  int N, min;
  cin >> N;
  min = N % 10;
  cout << min << endl;
  switch (min){
  case 3: cout << "bon" << endl; break;
  case 0:
  case 1:
  case 6:
  case 8:　cout << "pon" << endl; break;
  default :　cout << "hon" << endl; break;
  }
  
  return 0;
}  
      
  

Compiler output:
a.cc:15:10: error: extended character 　 is not valid in an identifier
   15 |   case 8:　cout << "pon" << endl; break;
      |          ^
a.cc:16:12: error: extended character 　 is not valid in an identifier
   16 |   default :　cout << "hon" << endl; break;
      |            ^
a.cc: In function 'int main()':
a.cc:15:10: error: '\U00003000cout' was not declared in this scope
   15 |   case 8:　cout << "pon" << endl; break;
      |          ^~~~~~
Language: C

#include<stdio.h>
int main()
{int N,i;
 scanf("%d",&N);
 for(i=0;i<3;i++)
 {
   if(N<10)
     break;
   else
n=n%10;
 }
 if(N==2 || N==4 || N==5 || N==7 || N==9)
   printf("hon");
 else if(N==3)
   printf("bon");
 else
   printf("pon");
   
}


Compiler output:
main.c: In function 'main':
main.c:10:1: error: 'n' undeclared (first use in this function)
   10 | n=n%10;
      | ^
main.c:10:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<conio.h>
void main()
{int N,i;
 scanf("%d",&N);
 for(i=0;i<3;i++)
 {
   if(N<10)
     break;
   else
n=n%10;
 }
 if(N==2 || N==4 || N==5 || N==7 || N==9)
   printf("hon");
 else if(N==3)
   printf("bon");
 else
   printf("pon");
   
}

Compiler output:
main.c:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C

n = input()

if n[-1] == '3':
  print('bon')
elif n[-1] == '0' or n[-1] == '1' or n[-1] == '6' or n[-1] == '8':
  print('pon')
else:
  print('hon')


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n = input()
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:5: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
    1 | n = input()
      |     ^~~~~
main.c:1:5: error: initializer element is not constant
main.c:3:1: error: expected ',' or ';' before 'if'
    3 | if n[-1] == '3':
      | ^~
main.c:4:9: warning: multi-character character constant [-Wmultichar]
    4 |   print('bon')
      |         ^~~~~
main.c:6:9: warning: multi-character character constant [-Wmultichar]
    6 |   print('pon')
      |         ^~~~~
main.c:8:9: warning: multi-character character constant [-Wmultichar]
    8 |   print('hon')
      |         ^~~~~
Language: Java

import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner input=new Scanner(System.in);
        String N=input.next();
        int a=N.charAt(N.lenght()-1)-48;
        if(a==3){
        System.out.print("bon");
        }else if(a==0||a==1||a==6||a==8){
        System.out.print("pon");
        }else{
        System.out.print("hon");
        }
    }   
}

Compiler output:
Main.java:6: error: cannot find symbol
        int a=N.charAt(N.lenght()-1)-48;
                        ^
  symbol:   method lenght()
  location: variable N of type String
1 error
Language: Java

        import java.util.Scanner;
        public class Main{
        public static void main(String[] args){
        	Scanner scan  = new Scanner(System.in);
        	int n = scan.nextInt();
          	swith(n%10){
              case 2:
              case 4:
              case 5: 
              case 7:
              case 9:
                System.out.println("hon");
                break;
              case 0:
              case 1:
              case 6:
              case 8:
                      System.out.println("pon");
                      break;
              case 3:
                System.out.println("bon");
                break;
            }
          return 0;
          
        }
        }

Compiler output:
Main.java:6: error: ';' expected
          	swith(n%10){
          	           ^
Main.java:7: error: orphaned case
              case 2:
              ^
2 errors
Language: Java

    import java.util.Scanner;
    public class Main{
    public static void main(String[] args){
    	Scanner scan  = new Scanner(System.in);
    	int n;
      	swith(n%10){
          case 2:
          case 4:
          case 5: 
          case 7:
          case 9:
            System.out.println("hon")
            break;
          case 0:
          case 1:
          case 6:
          case 8:
                  System.out.println("pon")
                  break;
          case 3:
            System.out.println("bon")
            break;
        }
      return 0;

Compiler output:
Main.java:6: error: ';' expected
      	swith(n%10){
      	           ^
Main.java:7: error: orphaned case
          case 2:
          ^
Main.java:12: error: ';' expected
            System.out.println("hon")
                                     ^
Main.java:18: error: ';' expected
                  System.out.println("pon")
                                           ^
Main.java:21: error: ';' expected
            System.out.println("bon")
                                     ^
Main.java:24: error: reached end of file while parsing
      return 0;
               ^
6 errors
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String[] args){
	Scanner scan  = new Scanner(System.in);
	int n;
  	swith(n%10){
      case:2
      case:4
      case:5  
      case:7
      case:9
        System.out.println("hon")
        break;
      case:0
        case:1
          case:6
            case:8
              System.out.println("pon")
              break;
      case:3
        System.out.println("bon")
        break;
    }
  return 0;

Compiler output:
Main.java:6: error: ';' expected
  	swith(n%10){
  	           ^
Main.java:7: error: orphaned case
      case:2
      ^
Main.java:7: error: illegal start of expression
      case:2
          ^
Main.java:7: error: not a statement
      case:2
           ^
Main.java:7: error: ';' expected
      case:2
            ^
Main.java:8: error: illegal start of expression
      case:4
          ^
Main.java:8: error: not a statement
      case:4
           ^
Main.java:8: error: ';' expected
      case:4
            ^
Main.java:9: error: illegal start of expression
      case:5  
          ^
Main.java:9: error: not a statement
      case:5  
           ^
Main.java:9: error: ';' expected
      case:5  
            ^
Main.java:10: error: illegal start of expression
      case:7
          ^
Main.java:10: error: not a statement
      case:7
           ^
Main.java:10: error: ';' expected
      case:7
            ^
Main.java:11: error: illegal start of expression
      case:9
          ^
Main.java:11: error: not a statement
      case:9
           ^
Main.java:11: error: ';' expected
      case:9
            ^
Main.java:12: error: ';' expected
        System.out.println("hon")
                                 ^
Main.java:14: error: illegal start of expression
      case:0
          ^
Main.java:14: error: not a statement
      case:0
           ^
Main.java:14: error: ';' expected
      case:0
            ^
Main.java:15: error: illegal start of expression
        case:1
            ^
Main.java:15: error: not a statement
        case:1
             ^
Main.java:15: error: ';' expected
        case:1
              ^
Main.java:16: error: illegal start of expression
          case:6
              ^
Main.java:16: error: not a statement
          case:6
               ^
Main.java:16: error: ';' expected
          case:6
                ^
Main.java:17: error: illegal start of expression
            case:8
                ^
Main.java:17: error: not a statement
            case:8
                 ^
Main.java:17: error: ';' expected
            case:8
                  ^
Main.java:18: error: ';' expected
              System.out.println("pon")
                                       ^
Main.java:20: error: illegal start of expression
      case:3
          ^
Main.java:20: error: not a statement
      case:3
           ^
Main.java:20: error: ';' expected
      case:3
            ^
Main.java:21: error: ';' expected
        System.out.println("bon")
                                 ^
Main.java:24: error: reached end of file while parsing
  return 0;
           ^
36 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
	int num;
	cin >> num;
	if (num & 3) 
		cout << "bon";
	else if (num&0 || num&1 || num&6 || num&8)
		cout << "pon";
	else
		cout << "hon"
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: expected ';' before 'return'
   12 |                 cout << "hon"
      |                              ^
      |                              ;
   13 |         return 0;
      |         ~~~~~~
Language: Java

Scanner scan = new Scanner(System.in)
int n = scan.nextInt();


Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
Scanner scan = new Scanner(System.in)
^
  (use --enable-preview to enable unnamed classes)
Main.java:1: error: ';' expected
Scanner scan = new Scanner(System.in)
                                     ^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
   ios::sync_with_stdio(0);
   cin.tie(0);
   string S;
   int k;
   cin >> S>>k;
   int l =S.length();
    if(l==k)
      cout<<S<<"\n";
    else{
      int e = l-k;
      string s =S.substr(0,e);
      s+="..."
      cout<<s<<"\n";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: expected ';' before 'cout'
   15 |       s+="..."
      |               ^
      |               ;
   16 |       cout<<s<<"\n";
      |       ~~~~
Language: C

#include<bits/stdc++.h>
using namespace std;
int main(){
   ios::sync_with_stdio(0);
   cin.tie(0);
   string S;
   cin >> S;
   int l =S.length();
   if (S[l-1]=='1' || S[l-1]=='0' || S[l-1]=='6' || S[l-1]=='8') cout << "pon";
   else if (S[l-1]=='2' || S[l-1]=='4' || S[l-1]=='5' || S[l-1]=='7' || S[l-1]=='9') cout << "hon";
   else cout << "bon";
}


Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
int n;
cin>>n;
if(n%10==2||n%10==4||n%2==5||n%2==7||n%2==9)
    cout<<"hon";
else (n%10==3)
    cout<<"pon";
else
    cout<<"bon";
     return 0;                 
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: expected ';' before 'cout'
   11 | else (n%10==3)
      |               ^
      |               ;
   12 |     cout<<"pon";
      |     ~~~~       
a.cc:13:1: error: 'else' without a previous 'if'
   13 | else
      | ^~~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
 int n;
 cin>>n;
 if(n%==2||n%==4||n%==5||n%==7||n%==9)
    cout<<"hon";
 else if(n%==0||n%==1||n%==6||n%==8)
    cout<<"pon";
    else if(n%==3)
    cout<<"bon";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: expected primary-expression before '=' token
    9 |  if(n%==2||n%==4||n%==5||n%==7||n%==9)
      |        ^
a.cc:9:15: error: expected primary-expression before '=' token
    9 |  if(n%==2||n%==4||n%==5||n%==7||n%==9)
      |               ^
a.cc:9:22: error: expected primary-expression before '=' token
    9 |  if(n%==2||n%==4||n%==5||n%==7||n%==9)
      |                      ^
a.cc:9:29: error: expected primary-expression before '=' token
    9 |  if(n%==2||n%==4||n%==5||n%==7||n%==9)
      |                             ^
a.cc:9:36: error: expected primary-expression before '=' token
    9 |  if(n%==2||n%==4||n%==5||n%==7||n%==9)
      |                                    ^
a.cc:11:13: error: expected primary-expression before '=' token
   11 |  else if(n%==0||n%==1||n%==6||n%==8)
      |             ^
a.cc:11:20: error: expected primary-expression before '=' token
   11 |  else if(n%==0||n%==1||n%==6||n%==8)
      |                    ^
a.cc:11:27: error: expected primary-expression before '=' token
   11 |  else if(n%==0||n%==1||n%==6||n%==8)
      |                           ^
a.cc:11:34: error: expected primary-expression before '=' token
   11 |  else if(n%==0||n%==1||n%==6||n%==8)
      |                                  ^
a.cc:13:16: error: expected primary-expression before '=' token
   13 |     else if(n%==3)
      |                ^
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main (void)
{
      int num = 0;
      scanf("%d",&num);
      if (num%10 == 0 || num&10 == 1|| num%10 == 6||num%10 ==8){
        printf("pon");
      }
      else{
        if (nu%10 == 3){
          printf("bon");
        }else{
          printf("hon");
        }
      }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'nu' was not declared in this scope; did you mean 'num'?
   11 |         if (nu%10 == 3){
      |             ^~
      |             num
Language: C++

define _CRT_SECURE_NO_WARNINGS
include<stdio.h>
int main (void)
{
      int num = 0;
      scanf("%d",&num);
      if (num%10 == 0 || num&10 == 1|| num%10 == 6||num%10 ==8){
        printf("pon");
      }
      else{
        if (nu%10 == 3){
          printf("bon");
        }else{
          printf("hon");
        }
      }
  return 0;
}

Compiler output:
a.cc:1:1: error: 'define' does not name a type
    1 | define _CRT_SECURE_NO_WARNINGS
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int N,S;
  cin >> N;
  S=N%10;
  if(S==2 || S==4 || S==5 || S==7 || S==9 ){
    cout << "hon" <<endl;
  }
  if(S==0||S==1||S==6||S==8){
    cout << "pon" <<endl;
  }
  if(S==3)
    cout << "bon" <<endl;
  }
}


Compiler output:
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	int n;
	cin >> n;
  int a[5]={2,4,5,7,9};
  int b[4]={0,1,6,8};
  
  for(int i=0;i<5;i++)
  {
    if(n%10==a[i])
  cout<<"hon"<<endl;
  }
  for(int i=0;i<4;i++)
  {if(n%10==b[i]
       cout<<"pon"<<endl;
       }
       
  if(n%10==3)
      cout<<"bon"<<endl;
      return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: expected ';' before 'cout'
   15 |   {if(n%10==b[i]
      |                 ^
      |                 ;
   16 |        cout<<"pon"<<endl;
      |        ~~~~      
a.cc:17:8: error: expected primary-expression before '}' token
   17 |        }
      |        ^
a.cc:16:26: error: expected ')' before '}' token
   16 |        cout<<"pon"<<endl;
      |                          ^
      |                          )
   17 |        }
      |        ~                  
a.cc:15:6: note: to match this '('
   15 |   {if(n%10==b[i]
      |      ^
a.cc:17:8: error: expected primary-expression before '}' token
   17 |        }
      |        ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n;
  cin>>n;
  res=n%10;
  if((res==2)||(res==4)||(res==5)||(res==7)||(res==9)){
    cout<<"hon";}
  else if((res==0)||(res==1)||(res==6)||(res==8)){
    cout<<"pon";}
  else
    cout<<"bon";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'res' was not declared in this scope
    6 |   res=n%10;
      |   ^~~
Language: Java

public class Main {

    public static void main (String[] args){
     int n;
     
      swich(n%10){
        case 2:
        case 4:
        case 5:
        case 7:
        case 9:
        	System.out.println("hon");
       		 break;
        case 0:
        case 1:
        case 6:
        case 8:
        	System.out.println("pon");
        	break;
        case 3:
        	System.out.println("bon");
        	break;
      }
    }
  
}
		

Compiler output:
Main.java:6: error: ';' expected
      swich(n%10){
                 ^
Main.java:7: error: orphaned case
        case 2:
        ^
2 errors
Language: Java

import java.util.Scanner;

public class A {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();

    int ld = N % 10;
    switch (ld) {
      case 2:
      case 4:
      case 5:
      case 7:
      case 9:
        System.out.println("hon");
        break;
      case 0:
      case 6:
      case 1:
      case 8:
        System.out.println("pon");
        break;
      case 3:
        System.out.println("bon");
        break;
    }
    sc.close();
  }
}


Compiler output:
Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Therefore {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();

    int ld = N % 10;
    switch (ld) {
      case 2:
      case 4:
      case 5:
      case 7:
      case 9:
        System.out.println("hon");
        break;
      case 0:
      case 6:
      case 1:
      case 8:
        System.out.println("pon");
        break;
      case 3:
        System.out.println("bon");
        break;
    }
  }
}


Compiler output:
Main.java:3: error: class Therefore is public, should be declared in a file named Therefore.java
public class Therefore {
       ^
1 error
Language: Java

import java.util.Scanner;

public class A {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();

    int ld = N % 10;
    switch (ld) {
      case 2:
      case 4:
      case 5:
      case 7:
      case 9:
        System.out.println("hon");
        break;
      case 0:
      case 6:
      case 1:
      case 8:
        System.out.println("pon");
        break;
      case 3:
        System.out.println("bon");
        break;
    }
  }
}


Compiler output:
Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Main.A {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();

    int ld = N % 10;
    switch (ld) {
      case 2:
      case 4:
      case 5:
      case 7:
      case 9:
        System.out.println("hon");
        break;
      case 0:
      case 6:
      case 1:
      case 8:
        System.out.println("pon");
        break;
      case 3:
        System.out.println("bon");
        break;
    }
  }
}


Compiler output:
Main.java:3: error: '{' expected
public class Main.A {
                 ^
1 error
Language: Java

import java.util.Scanner;



  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();

    int ld = N % 10;
    switch (ld) {
      case 2:
      case 4:
      case 5:
      case 7:
      case 9:
        System.out.println("hon");
        break;
      case 0:
      case 6:
      case 1:
      case 8:
        System.out.println("pon");
        break;
      case 3:
        System.out.println("bon");
        break;
    }
  }



Compiler output:
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
  public static void main(String[] args) {
                ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java


   Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();

    int ld = N % 10;
    switch (ld) {
      case 2:
      case 4:
      case 5:
      case 7:
      case 9:
        System.out.println("hon");
        break;
      case 0:
      case 6:
      case 1:
      case 8:
        System.out.println("pon");
        break;
      case 3:
        System.out.println("bon");
        break;
    }
  



Compiler output:
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
   Scanner sc = new Scanner(System.in);
   ^
  (use --enable-preview to enable unnamed classes)
Main.java:7: error: class, interface, enum, or record expected
    switch (ld) {
    ^
Main.java:14: error: class, interface, enum, or record expected
        break;
        ^
Main.java:15: error: class, interface, enum, or record expected
      case 0:
      ^
Main.java:20: error: class, interface, enum, or record expected
        break;
        ^
Main.java:21: error: class, interface, enum, or record expected
      case 3:
      ^
Main.java:23: error: class, interface, enum, or record expected
        break;
        ^
Main.java:24: error: class, interface, enum, or record expected
    }
    ^
8 errors
Language: Java

import java.util.Scanner;


public class A {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();

    int ld = N % 10;
    switch (ld) {
      case 2:
      case 4:
      case 5:
      case 7:
      case 9:
        System.out.println("hon");
        break;
      case 0:
      case 6:
      case 1:
      case 8:
        System.out.println("pon");
        break;
      case 3:
        System.out.println("bon");
        break;
    }
  } 
}


Compiler output:
Main.java:4: error: class A is public, should be declared in a file named A.java
public class A {
       ^
1 error
Language: Java

import java.util.Scanner;



  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();

    int ld = N % 10;
    switch (ld) {
      case 2:
      case 4:
      case 5:
      case 7:
      case 9:
        System.out.println("hon");
        break;
      case 0:
      case 6:
      case 1:
      case 8:
        System.out.println("pon");
        break;
      case 3:
        System.out.println("bon");
        break;
    }
  
}


Compiler output:
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
  public static void main(String[] args) {
                ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C

#include<stdio.h>
int main (void)
{
    int n;
    scanf("%d",&a);
    int b=a%10;
    if (b==3)printf("bon");
    else if(b==0||b==1||b==6||b==8)printf("pon");
    else printf("hon");
    
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:17: error: 'a' undeclared (first use in this function)
    5 |     scanf("%d",&a);
      |                 ^
main.c:5:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main () {
  int N;
  scanf("%d",&N);
  char str[][] = {"hon","pon","bon"};
  
  switch(N%10){
    case 0:
    case 1:
    case 6:
    case 8:
      printf("%s",str[1]);
      break;
    case 3:
      printf("%s",str[2]);
      break;
    default:
      printf("%s",str[1]);
      break;
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:8: error: array type has incomplete element type 'char[]'
    6 |   char str[][] = {"hon","pon","bon"};
      |        ^~~
main.c:6:8: note: declaration of 'str' as multidimensional array must have bounds for all dimensions except the first
Language: C

#include <stdio.h>

int main () {
  int N;
  scanf("%d",&N);
  char str[3][] = {"hon","pon","bon"};
  
  switch(N%10){
    case 0:
    case 1:
    case 6:
    case 8:
      printf("%s",str[1]);
      break;
    case 3:
      printf("%s",str[2]);
      break;
    default:
      printf("%s",str[1]);
      break;
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:8: error: array type has incomplete element type 'char[]'
    6 |   char str[3][] = {"hon","pon","bon"};
      |        ^~~
main.c:6:8: note: declaration of 'str' as multidimensional array must have bounds for all dimensions except the first
Language: C++

#include<bits/stdc++.h>

int main(){
	string s;
	int k;
	cin >> k;
	cin >> s;
	if (s.size() <= k) cout << s;
	else cout << s.substr(0, k) << "...";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'string' was not declared in this scope
    4 |         string s;
      |         ^~~~~~
a.cc:4:9: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> k;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:16: error: 's' was not declared in this scope
    7 |         cin >> s;
      |                ^
a.cc:8:28: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         if (s.size() <= k) cout << s;
      |                            ^~~~
      |                            std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |         else cout << s.substr(0, k) << "...";
      |              ^~~~
      |              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>

using namespace std;

int main(){
	int n;
  	cin>>n;
  	if(n%10 ==2 ||n%10 ==4||n%10 ==5||n%10 ==7||n%10 ==9)
    {
      cout<<'hon';
    }
  else if(n%10 ==0||n%10 ==1||n%10 ==6||n%10 ==8)
  {
    cout<<'pon';
  }
  else if(n%10 ==3){
    cout<<'bon
  }
}

Compiler output:
a.cc:10:13: warning: multi-character character constant [-Wmultichar]
   10 |       cout<<'hon';
      |             ^~~~~
a.cc:14:11: warning: multi-character character constant [-Wmultichar]
   14 |     cout<<'pon';
      |           ^~~~~
a.cc:17:11: warning: missing terminating ' character
   17 |     cout<<'bon
      |           ^
a.cc:17:11: error: missing terminating ' character
   17 |     cout<<'bon
      |           ^~~~
a.cc: In function 'int main()':
a.cc:18:3: error: expected primary-expression before '}' token
   18 |   }
      |   ^
Language: C++

//g++ -std=gnu++14 a.cpp
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <tuple>
#include <iomanip>
#include <random>
#include <math.h>
#include <stdio.h>

using namespace std;

#define ll long long
#define rep(i, n) for(ll i = 0; i < (n); i++)
ll MOD = 1e9 + 7;
int INF = 1 << 30;
ll INFL = 1LL << 60;

int main(){
  int n;
  cin >> n;
  int iti = n%10;
  if(iti==2&&iti==4&&iti=5&&iti==7&&iti==9)cout << "hon" << endl;
  else if(iti==0&&iti==1&&iti==6&&iti==8)cout << "pon" << endl;
  else cout << "bon" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:20: error: lvalue required as left operand of assignment
   33 |   if(iti==2&&iti==4&&iti=5&&iti==7&&iti==9)cout << "hon" << endl;
      |      ~~~~~~~~~~~~~~^~~~~
Language: Java

import java.util.scanner;
class Atcorder{
	public static void main(Strig[]args){
    Scanner sc = new Scannr(System.in);
    	int N = 16;
        int mod = N %10;
        
        switch(mod){
        case 2:
        case 4:
        case 5:
        case 7:
        case 9:
        	System.out.println(N + "hon")
			break;
            
       case 0:
       case 1:
       case 6:
       case 8:
       		System.out.println(N + "pon")
            break;
            
       case 3:
       		System.out.println(N + "bon")        
        
        
        
        }
    
    
    }
    

}

Compiler output:
Main.java:14: error: ';' expected
        	System.out.println(N + "hon")
        	                             ^
Main.java:21: error: ';' expected
       		System.out.println(N + "pon")
       		                             ^
Main.java:25: error: ';' expected
       		System.out.println(N + "bon")        
       		                             ^
3 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int N;
  cin >> N;
  
  if(N % 10 = 2||4||5||7||9){
 cout << "hon" << endl;
  }
     
  if(N % 10= 0||1||6||8){
    cout << "pon" << endl;
  }
    
   if(N % 10= 3){
     cout << "bon " << endl;
   }
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: lvalue required as left operand of assignment
    8 |   if(N % 10 = 2||4||5||7||9){
      |      ~~^~~~
a.cc:12:8: error: lvalue required as left operand of assignment
   12 |   if(N % 10= 0||1||6||8){
      |      ~~^~~~
a.cc:16:9: error: lvalue required as left operand of assignment
   16 |    if(N % 10= 3){
      |       ~~^~~~
Language: C++

#include <stdc/bits++.h>
using namespace std;

int main(){
  int N;
  cin >> N;
  
  if(N % 10 = 2||4||5||7||9){
 cout << "hon" << endl;
  }
     
  if(N % 10= 0||1||6||8){
    cout << "pon" << endl;
  }
    
   if(N % 10= 3){
     cout << "bon " << endl;
   }
}
  

Compiler output:
a.cc:1:10: fatal error: stdc/bits++.h: No such file or directory
    1 | #include <stdc/bits++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;

int main() {
  	string n;
	cin >> n;
    if(n.a(0)==2 || n.a(0)==4 || n.a(0)==5 || n.a(0)==7 || n.a(0)==9){
    	cout << "hon" << endl;
    }
  	else if(n.a(0)==0 || n.a(0)==1 || n.a(0)==6 || n.a(0)==8){
    	cout << "pon" << endl;
    }
  	else {
    	cout << "bon" << endl;
    }
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'a'; did you mean 'at'?
    7 |     if(n.a(0)==2 || n.a(0)==4 || n.a(0)==5 || n.a(0)==7 || n.a(0)==9){
      |          ^
      |          at
a.cc:7:23: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'a'; did you mean 'at'?
    7 |     if(n.a(0)==2 || n.a(0)==4 || n.a(0)==5 || n.a(0)==7 || n.a(0)==9){
      |                       ^
      |                       at
a.cc:7:36: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'a'; did you mean 'at'?
    7 |     if(n.a(0)==2 || n.a(0)==4 || n.a(0)==5 || n.a(0)==7 || n.a(0)==9){
      |                                    ^
      |                                    at
a.cc:7:49: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'a'; did you mean 'at'?
    7 |     if(n.a(0)==2 || n.a(0)==4 || n.a(0)==5 || n.a(0)==7 || n.a(0)==9){
      |                                                 ^
      |                                                 at
a.cc:7:62: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'a'; did you mean 'at'?
    7 |     if(n.a(0)==2 || n.a(0)==4 || n.a(0)==5 || n.a(0)==7 || n.a(0)==9){
      |                                                              ^
      |                                                              at
a.cc:10:19: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'a'; did you mean 'at'?
   10 |         else if(n.a(0)==0 || n.a(0)==1 || n.a(0)==6 || n.a(0)==8){
      |                   ^
      |                   at
a.cc:10:32: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'a'; did you mean 'at'?
   10 |         else if(n.a(0)==0 || n.a(0)==1 || n.a(0)==6 || n.a(0)==8){
      |                                ^
      |                                at
a.cc:10:45: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'a'; did you mean 'at'?
   10 |         else if(n.a(0)==0 || n.a(0)==1 || n.a(0)==6 || n.a(0)==8){
      |                                             ^
      |                                             at
a.cc:10:58: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'a'; did you mean 'at'?
   10 |         else if(n.a(0)==0 || n.a(0)==1 || n.a(0)==6 || n.a(0)==8){
      |                                                          ^
      |                                                          at
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int num;
    cin >> num;
    int o = num % 10;
    i1f (o == 2 || o == 4 || o == 5 || o == 7 || o == 9)
    {
        cout << "hon" << endl;
    }
    else if (o == 0 || o == 1 || o == 6 || o == 8)
    {
        cout << "pon" << endl;
    }
    else if (o == 3)
    {
        cout << "bon" << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'i1f' was not declared in this scope; did you mean 'y1f'?
    8 |     i1f (o == 2 || o == 4 || o == 5 || o == 7 || o == 9)
      |     ^~~
      |     y1f
a.cc:12:5: error: 'else' without a previous 'if'
   12 |     else if (o == 0 || o == 1 || o == 6 || o == 8)
      |     ^~~~
Language: C

include<stdio.h>

main int(){
    int N,n;
    scanf("%d",&N);

    n = N%10;

    if(n==2,4,5,7,9){
        printf("hon");
    }elseif(n==0,1,6,8){
        printf("pon");
    }else{
        printf("bon");
    }

    return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

include<stdio.h>

main int()}{
    int N,n;
    scanf("%d",&N);

    n = N%10;

    if(n==2,4,5,7,9){
        printf("hon");
    }elseif(n==0,1,6,8){
        printf("pon");
    }else{
        printf("bon");
    }

    return 0;
}


Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c:3:12: error: expected identifier or '(' before '{' token
    3 | main int()}{
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
ll mod = 1000000007;

ll power(ll x, ll y)
{
    ll res = 1;
    x = x%mod;
    while (y)
    {
        if (y&1) res = ((res%mod)*(x%mod))%mod;

        y>>=1;
        x = ((x%mod)*(x%mod))%mod;
    }
    return res;
}

int main(){

    ios::sync_with_stdio(false);
    cin.tie(0);

    int n,
    cin >> n;
    n %= 10;
    if(n==3) cout << "bon\n";
    else if(n==0 || n==1 || n==6 || n==8) cout << "pon\n";
    else cout << "hon\n";

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: expected initializer before '>>' token
   27 |     cin >> n;
      |         ^~
Language: C

#include <iostream>

using namespace std;
int N;
int main(){
    cin >> N;
    int t = N % 10;
    if(t == 3) cout << "bon";
    else if(t == 0 || t == 1 || t == 6 || t == 8) cout << "pon";
    else cout << "hon";
    return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<conio.h>

int main(void)
{
    int N;
    scanf("%d",&N);
    int last=N%10;
    if(last==2 || last==4 || last==5 || last==7 || last==9)
        printf("hon");
    else if(last==0 || last==1 || last==6 || last==8)
        printf("pon");
    else
        printf("bon");


    return 0;
}


Compiler output:
main.c:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <string>

int main(){
  int N
  std::cin >> N;
  if(N%10 == 3){
    std::cout << "bon";
  }
  else if(N%10 == 0||N%10 == 1||N%10 == 6||N%10 == 8){
     std::cout << "pon";
  }
  else{
    std::cout << "hon";
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'std'
    6 |   std::cin >> N;
      |   ^~~
a.cc:7:6: error: 'N' was not declared in this scope
    7 |   if(N%10 == 3){
      |      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main ()
{
    string s;
    cin >> s;
	char c = s[s.size()-1];
    if(c == '2' || c == '4' || c == '5' || c == '7' || c == '9'){
      cout << "hon" << '\n';
    }
  	else if(c == '0' || c == '1' || c == '6' || c == '8'){
      cout << "pon"  << '\n';
    }
  	else{
      cout << "bon"  << '\n';
    }
  	return 0
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: expected ';' before '}' token
   18 |         return 0
      |                 ^
      |                 ;
   19 | }
      | ~
Language: C++

using namespace std;

int main ()
{
    string s;
    cin >> s;
	char c = s[s.size()-1];
    if(c == '2' || c == '4' || c == '5' || c == '7' || c == '9'){
      cout << "hon" << '\n';
    }
  	else if(c == '0' || c == '1' || c == '6' || c == '8'){
      cout << "pon"  << '\n';
    }
  	else{
      cout << "bon"  << '\n';
    }
  	return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string s;
      |     ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> s;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:6:12: error: 's' was not declared in this scope
    6 |     cin >> s;
      |            ^
a.cc:9:7: error: 'cout' was not declared in this scope
    9 |       cout << "hon" << '\n';
      |       ^~~~
a.cc:9:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:7: error: 'cout' was not declared in this scope
   12 |       cout << "pon"  << '\n';
      |       ^~~~
a.cc:12:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:7: error: 'cout' was not declared in this scope
   15 |       cout << "bon"  << '\n';
      |       ^~~~
a.cc:15:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:17: error: expected ';' before '}' token
   17 |         return 0
      |                 ^
      |                 ;
   18 | }
      | ~
Language: C++

int main ()
{
    string s;
    cin >> s;
	char c = s[s.size()-1]
    if(c == '2' || c == '4' || c == '5' || c == '7' || c == '9'){
      cout << "hon" << '\n';
    }
  	else if(c == '0' || c == '1' || c == '6' || c == '8'){
      cout << "pon"  << '\n';
    }
  	else{
      cout << "bon"  << '\n';
    }
  	return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'string' was not declared in this scope
    3 |     string s;
      |     ^~~~~~
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> s;
      |     ^~~
a.cc:4:12: error: 's' was not declared in this scope
    4 |     cin >> s;
      |            ^
a.cc:12:9: error: 'else' without a previous 'if'
   12 |         else{
      |         ^~~~
a.cc:13:7: error: 'cout' was not declared in this scope
   13 |       cout << "bon"  << '\n';
      |       ^~~~
a.cc:15:17: error: expected ';' before '}' token
   15 |         return 0
      |                 ^
      |                 ;
   16 | }
      | ~
Language: C++

int main ()
{
    string s;
    cin >> s;
	c = s[s.size()-1]
    if c == '2' || c == '4' || c == '5' || c == '7' || c == '9'{
      cout <<  'hon' << '\n'
    }
  	else if c == '0' || c == '1' || c == '6' || c == '8'{
      cout << 'pon'  << '\n'
    }
  	else{
      cout << 'bon'  << '\n'
    }
}

Compiler output:
a.cc:7:16: warning: multi-character character constant [-Wmultichar]
    7 |       cout <<  'hon' << '\n'
      |                ^~~~~
a.cc:10:15: warning: multi-character character constant [-Wmultichar]
   10 |       cout << 'pon'  << '\n'
      |               ^~~~~
a.cc:13:15: warning: multi-character character constant [-Wmultichar]
   13 |       cout << 'bon'  << '\n'
      |               ^~~~~
a.cc: In function 'int main()':
a.cc:3:5: error: 'string' was not declared in this scope
    3 |     string s;
      |     ^~~~~~
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> s;
      |     ^~~
a.cc:4:12: error: 's' was not declared in this scope
    4 |     cin >> s;
      |            ^
a.cc:5:9: error: 'c' was not declared in this scope
    5 |         c = s[s.size()-1]
      |         ^
a.cc:9:9: error: 'else' without a previous 'if'
    9 |         else if c == '0' || c == '1' || c == '6' || c == '8'{
      |         ^~~~
a.cc:9:17: error: expected '(' before 'c'
    9 |         else if c == '0' || c == '1' || c == '6' || c == '8'{
      |                 ^
      |                 (
a.cc:12:9: error: 'else' without a previous 'if'
   12 |         else{
      |         ^~~~
a.cc:13:7: error: 'cout' was not declared in this scope
   13 |       cout << 'bon'  << '\n'
      |       ^~~~
Language: C++

#include<stdio.h>

int main()
{
    int a;
    // get a integer
    scanf("%d", &a);
    string str;
    a = a mod 10;
    switch(a){
    case 2:
            case 4:
            case 5:
            case 7:
            case 9:
          str = 'pon'
       break; // 可选的
      case 0:
            case 1:
            case 6:
            case 8:
       str ='hon'
       break; // 可选的
    case 3:
        str='bon'
       break; // 可选的

}
    // output
    printf("%s",str);
    return 0;
}


Compiler output:
a.cc:16:17: warning: multi-character character constant [-Wmultichar]
   16 |           str = 'pon'
      |                 ^~~~~
a.cc:22:13: warning: multi-character character constant [-Wmultichar]
   22 |        str ='hon'
      |             ^~~~~
a.cc:25:13: warning: multi-character character constant [-Wmultichar]
   25 |         str='bon'
      |             ^~~~~
a.cc: In function 'int main()':
a.cc:8:5: error: 'string' was not declared in this scope; did you mean 'stdin'?
    8 |     string str;
      |     ^~~~~~
      |     stdin
a.cc:9:10: error: expected ';' before 'mod'
    9 |     a = a mod 10;
      |          ^~~~
      |          ;
a.cc:16:11: error: 'str' was not declared in this scope; did you mean 'std'?
   16 |           str = 'pon'
      |           ^~~
      |           std
a.cc:30:17: error: 'str' was not declared in this scope; did you mean 'std'?
   30 |     printf("%s",str);
      |                 ^~~
      |                 std
Language: C++

#include<stdio.h>

int main()
{
    int a;
    str ans;
    // get a integer
    scanf("%d", &a);
    string str;
  a = a mod 10
    switch(a){
    case 2:
            case 4:
            case 5:
            case 7:
            case 9:
          str = 'pon'
       break; // 可选的
      case 0:
            case 1:
            case 6:
            case 8:
       str ='hon'
       break; // 可选的
    case 3:
        str='bon'
       break; // 可选的

}
    // output
    printf("%s",str);
    return 0;
}

Compiler output:
a.cc:17:17: warning: multi-character character constant [-Wmultichar]
   17 |           str = 'pon'
      |                 ^~~~~
a.cc:23:13: warning: multi-character character constant [-Wmultichar]
   23 |        str ='hon'
      |             ^~~~~
a.cc:26:13: warning: multi-character character constant [-Wmultichar]
   26 |         str='bon'
      |             ^~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |     str ans;
      |     ^~~
      |     std
a.cc:9:5: error: 'string' was not declared in this scope; did you mean 'stdin'?
    9 |     string str;
      |     ^~~~~~
      |     stdin
a.cc:10:8: error: expected ';' before 'mod'
   10 |   a = a mod 10
      |        ^~~~
      |        ;
Language: C++


int main() {
    int s;
    cin >> s;
    switch (s % 10) {
        case 2:
        case 4:
        case 5:
        case 7:
        case 9: cout << "hon"; break;
        case 0:
        case 1:
        case 6:
        case 8: cout << "pon"; break;
        default: cout << "bon";
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> s;
      |     ^~~
a.cc:10:17: error: 'cout' was not declared in this scope
   10 |         case 9: cout << "hon"; break;
      |                 ^~~~