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

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
using ll=long long;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define MOD  1000000007
const ll INF=1e18;
template<class T>void show(vector<T>v){for (int i = 0; i < v.size(); i++){cerr<<v[i]<<" ";}cerr<<endl;}
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b){ a = b; return 1; } return 0; }



int main(int argc, char const *argv[]) {
  string l[10] = {"pon", "pon", å"hon", "bon", "hon",
                  "hon", "pon", "hon", "pon", "hon"};
  int n;cin >> n;
  cout << l[n%10] << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:21:33: error: '\U000000e5' was not declared in this scope
   21 |   string l[10] = {"pon", "pon", å"hon", "bon", "hon",
      |                                 ^
a.cc:21:34: error: expected '}' before string constant
   21 |   string l[10] = {"pon", "pon", å"hon", "bon", "hon",
      |                  ~               ^~~~~
a.cc:21:34: error: expected ',' or ';' before string constant
a.cc: At global scope:
a.cc:23:9: error: 'cin' does not name a type
   23 |   int n;cin >> n;
      |         ^~~
a.cc:24:3: error: 'cout' does not name a type
   24 |   cout << l[n%10] << endl;
      |   ^~~~
a.cc:25:3: error: expected unqualified-id before 'return'
   25 |   return 0;
      |   ^~~~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main (){
	int X[10];
    X[0] ='pon';
  	X[1] ='pon';
  	X[2] ='hon';
    X[3] ='bon';
 	X[4] ='hon';
	X[5] ='hon';
    X[6] ='pon';
    X[7] ='hon';
    X[8] ='pon';
    X[9] ='hon';
  	int Y
  	cin >> Y;
    int S = Y%10;
  	cout << X[S] <<endl;
}

Compiler output:
a.cc:6:11: warning: multi-character character constant [-Wmultichar]
    6 |     X[0] ='pon';
      |           ^~~~~
a.cc:7:15: warning: multi-character character constant [-Wmultichar]
    7 |         X[1] ='pon';
      |               ^~~~~
a.cc:8:15: warning: multi-character character constant [-Wmultichar]
    8 |         X[2] ='hon';
      |               ^~~~~
a.cc:9:11: warning: multi-character character constant [-Wmultichar]
    9 |     X[3] ='bon';
      |           ^~~~~
a.cc:10:15: warning: multi-character character constant [-Wmultichar]
   10 |         X[4] ='hon';
      |               ^~~~~
a.cc:11:15: warning: multi-character character constant [-Wmultichar]
   11 |         X[5] ='hon';
      |               ^~~~~
a.cc:12:11: warning: multi-character character constant [-Wmultichar]
   12 |     X[6] ='pon';
      |           ^~~~~
a.cc:13:11: warning: multi-character character constant [-Wmultichar]
   13 |     X[7] ='hon';
      |           ^~~~~
a.cc:14:11: warning: multi-character character constant [-Wmultichar]
   14 |     X[8] ='pon';
      |           ^~~~~
a.cc:15:11: warning: multi-character character constant [-Wmultichar]
   15 |     X[9] ='hon';
      |           ^~~~~
a.cc: In function 'int main()':
a.cc:17:9: error: expected initializer before 'cin'
   17 |         cin >> Y;
      |         ^~~
a.cc:18:13: error: 'Y' was not declared in this scope
   18 |     int S = Y%10;
      |             ^
Language: C++

#include <stdc++.h>
  #include <algorithm>
  #include <bitset>
  #include <complex>
  #include <deque>
  #include <exception>
  #include <fstream>
  #include <functional>
  #include <iomanip>
  #include <ios>
  #include <iosfwd>
  #include <iostream>
  #include <istream>
  #include <iterator>
  #include <limits>
  #include <list>
  #include <locale>
  #include <map>
  #include <memory>
  #include <new>
  #include <numeric>
  #include <ostream>
  #include <queue>
  #include <set>
  #include <sstream>
  #include <stack>
  #include <stdexcept>
  #include <streambuf>
  #include <string>
  #include <typeinfo>
  #include <utility>
  #include <valarray>
  #include <vector>

using namespace std;

int main(){
    int N;
    cin >> N;
    vector<int> number;
    while(N>0)
    {
        number.push_back(N%10);
        N/=10;
    }

    switch (number[0])
    {
    case 2: case 4: case 5: case 7: case 9:
        cout << "hon"<< "\n";
        break;
    case 0: case 1: case 6: case 8:
        cout << "pon"<< "\n";
        break;
    case 3:
        cout << "bon"<< "\n";
        break;
    default:
        break;
    }



}

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

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

int main(){
    int N;
    cin >> N;
    vector<int> number;
    while(N>0)
    {
        number.push_back(N%10);
        N/=10;
    }

    switch (number[0])
    {
    case 2: case 4: case 5: case 7: case 9:
        cout << "hon"<< "\n";
        break;
    case 0: case 1: case 6: case 8:
        cout << "pon"<< "\n";
        break;
    case 3:
        cout << "bon"<< "\n";
        break;
    default:
        break;
    }



}

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

#include <bits/stdc++.h> 
#include <cmath>

using namespace std; 
  
int main() 
{ 
 int n;
 if(n%10=2||n%10=4||n%10=5||n%10=7||n%10=9)
   cout<<"hon";
 if(n%10=0||n%10=1||n%10=6||n%10=8)
   cout<<"pon";
 if(n%10==3)
   cout<<"bon";
} 


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

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using namespace std;
using P = pair<int, int>; 
using ll = long long;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:30: error: 'N' was not declared in this scope
   15 |   else if(n == 0 || n == 1|| N == 6 || n == 8){
      |                              ^
Language: C++

#include "stdc++.h"
using namespace std;

void ans(int x) {
	if (x == 2 || x == 4 || x == 5 || x == 7 || x == 9) {
		cout << "hon" << endl;
	}
	else if (x == 3) {
		cout << "bon" << endl;
	}
	else {
		cout << "pon" << endl;
	}
}

int main() {
	int n;
	cin >> n;

	if (n < 10) {
		ans(n);
	}
	else if (n >= 10 && n < 100) {
		n = n % 10;
		ans(n);
	}
	else {
		n = n % 100;
		n = n % 10;
		ans(n);
	}

	return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdc++.h: No such file or directory
    1 | #include "stdc++.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: Java


public class A {

	public static void main(String[] args) {
		int num = new java.util.Scanner(System.in).nextInt()%10;
		int[] hon = {2,4,5,7,9};
		int[] pon = {0,1,6,8};
		int[] bon = {3};
		int times = hon.length+pon.length+bon.length;
		System.out.print(num);
		for ( int i=0 ; i<times ; i++ ) {
			if ( num == hon[i]) {
				System.out.println("hon");
				break;
			} else if ( num == pon[i] ) {
				System.out.println("pon");
				break;
			} else if ( num == bon[i] ) {
				System.out.println("bon");
				break;
			}
		}
	}

}


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

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

#define V vector
typedef long long ll;
typedef unsigned long long ull;

typedef V<int> vi;
typedef V<ll> vll;
typedef V<string> vs;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define f(i,a) for(int i = 0 ; i < a ; i++)
#define fll(i,a) for(ll i = 0 ; i < a ;i++)
#define forab(i,a,b) for(int i = a ; i < b ; i++)
#define prec(x) cout<<fixed<<setprecision(x)
#define ff first
#define ss second

#define pb push_back
#define mp make_pair
#define numberofdigits(x) floor(log10(x)) + 1
#define M 1000000007

long long binpow(long long a, long long b) {
	long long res = 1;
	while (b > 0) {
		if (b & 1)
			res = (res * a) % M;
		a = (a * a) % M;
		b >>= 1;
	}
	return res;
}

auto sgn = [&](int x) {
	if (x > 0) return 1;
	else return -1;
};

void solve()
{
	int n;
	cin >> n;

	set<int> hon = { 2 , 4 , 5 , 7 , 9 };
	set<int> pon = {0 , 1 , 6 , 8};
	set<int> bon = {3};

	int d = n % 10;

	if (hon.count(d) > 0)
	{
		cout << "hon\n";
		return;
	}

	if (pon.count(d) > 0)
	{
		cout << "pon\n";
		return;
	}

	if (bon.count(d) > 0)
	{
		cout << "bon\n";
		return;
	}
}

int main() {

	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);

	int t = 1;
	//cin>>t;
	while (t--)
		solve();

	return 0;
}


Compiler output:
a.cc:37:13: error: non-local lambda expression cannot have a capture-default
   37 | auto sgn = [&](int x) {
      |             ^
Language: C++

 #include <stdio.h>

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

 switch (n % 10) {
 case 2:
 case 4:
 case 5:
 case 7:
 case 9:
 puts("hon");
 break;
 case 0:
 case 1:
 case 6:
 case 8:
 puts("pon");
 break;
 case 3:
1
 puts("bon");
 break;
 }
25
26 return 0;
27 }

Compiler output:
a.cc: In function 'int main()':
a.cc:22:2: error: expected ';' before 'puts'
   22 | 1
      |  ^
      |  ;
   23 |  puts("bon");
      |  ~~~~
a.cc:26:3: error: expected ';' before numeric constant
   26 | 25
      |   ^
      |   ;
   27 | 26 return 0;
      | ~~ 
a.cc:28:3: error: expected ';' before '}' token
   28 | 27 }
      |   ^~
      |   ;
Language: Java

int a = 234;

if(a%10==2)
{
  System.out,println("Hon")
}
else if(a%10==4)
{
  System.out,println("Hon")
}else if(a%10==5)
{
  System.out,println("Hon")
}else if(a%10==7)
{
  System.out,println("Hon")
}else if(a%10==9)
{
  System.out,println("Pon")
}else if(a%10==0)
{
  System.out,println("Pon")
}else if(a%10==1)
{
  System.out,println("Pon")
}else if(a%10==6)
{
  System.out,println("Pon")
}else if(a%10==8)
{
  System.out,println("Pon")
}else if(a%10==3)
{
  System.out,println("Bon")
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
int a = 234;
^
  (use --enable-preview to enable unnamed classes)
Main.java:3: error: class, interface, enum, or record expected
if(a%10==2)
^
2 errors
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: expected primary-expression before '==' token
    7 |   if (a % 10 == 2 ||  == 4 || a % 10 == 5 || a % 10 == 7 || a % 10 ==9)
      |                       ^~
Language: C++

#include <iostream>
#include<math.h>

int main()
{
    double A,B,H,M;
    double r;
    std::cin>>A>>B>>H>>M;
    H=(H*60+M)*.5;
    H > M*6 ? r = H - M*6 : r = M*6 - H;
    if(r>180)
    {
        r=360-r;
    }
    if(r==0)
    {
        std::cout<< 0 << std::endl;
        return 0;
    }

    r = (r  * M_PI)/ 180.0;
    std::cout<<sqrt((double)(A*A+B*B)-(double)(2*A*B)*(double)cos(r))) << endl;;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:70: error: expected ';' before ')' token
   22 |     std::cout<<sqrt((double)(A*A+B*B)-(double)(2*A*B)*(double)cos(r))) << endl;;
      |                                                                      ^
      |                                                                      ;
Language: C

#include <bits/stdc++.h>
using namespace std;
#define IOS ios_base::sync_with_stdio(0);cin.tie();cout.tie();
#define ff first
#define ss second
#define pb push_back
typedef long long ll;
typedef unsigned long long ull;
const ll mod = 1e9 + 7;
const ll inf = 9223372036854775807;
const ll mininf = -9223372036854775807;
const ll nax = 0;

int main(){
	IOS
	int n;
	cin >> n;
	int huruf=n%10;
	if(huruf==3){
		cout << "bon" << '\n';
	}
	else if(huruf== 0 or huruf== 1 or huruf== 6 or huruf==8){
		cout << "pon" << '\n';
	}
	else{
		cout << "hon" << '\n';
  	}
}


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

#include <stdio.h>

int
main (void)
{
  int n;
  scanf ("%d", &n);
  n %= 10;
  
  if (n == 0 || n == 1 || n == 6 || n == 8=)
    puts ("pon");
  else if (n == 3)
    puts ("bon");
  else
    puts ("hon");
      
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:44: error: expected expression before ')' token
   10 |   if (n == 0 || n == 1 || n == 6 || n == 8=)
      |                                            ^
Language: C++

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

int main(){
  int N;
  cin >> N;

  for(int i = 0; i = 20; i++){ 
    if(N >= 100){
      N -= 100;
    }
    if(N >= 10 && N < 100){
      N -= 10;
    }
    if(N < 10){
      break;
    }
    
  }

  if(N == 2 || N == 4 || N == 5 || N == 7 || N == 9){
    cout << "hon" << endl;
  }
  if(N == 0 || N == 6 || N == 8){
    cout << "pon" << endl;
  }
  if(N == 3){
    cout << "bon" << endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:30:4: error: expected '}' at end of input
   30 |   }
      |    ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++


#include<isotream>
using namespace std;
int main()
{
    long long int x;
    cin>>x;
    int y=x%10;
    if(y==2 or y==4 or y==5 or y==7 or y==9) cout<<"hon";
    else if(y==0 or y==1 or y==6 or y==8) cout<<"pon";
    else cout<<"bon";
}


Compiler output:
a.cc:2:9: fatal error: isotream: No such file or directory
    2 | #include<isotream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main{

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

  }
  return 0;
}


Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:3:12: error: expected primary-expression before 'long'
    3 | #define ll long long
      |            ^~~~
a.cc:6:1: note: in expansion of macro 'll'
    6 | ll n;
      | ^~
a.cc:3:12: error: expected '}' before 'long'
    3 | #define ll long long
      |            ^~~~
a.cc:6:1: note: in expansion of macro 'll'
    6 | ll n;
      | ^~
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:7:1: error: 'cin' does not name a type
    7 | cin>>n;
      | ^~~
a.cc:8:3: error: expected unqualified-id before 'if'
    8 |   if((n%10)==2 )|| ((n%10)==4) || ((n%10)==5) || ((n%10) ==7) || ((n%10)==9)){
      |   ^~
a.cc:12:3: error: expected unqualified-id before 'else'
   12 |   else if(((n%10)==0)|| ((n%10)==1) ||  ((n%10)==6)  || ((n%10)==8)){
      |   ^~~~
a.cc:15:3: error: expected unqualified-id before 'else'
   15 |   else if((n%10)==3){
      |   ^~~~
a.cc:19:3: error: expected unqualified-id before 'return'
   19 |   return 0;
      |   ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main{

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

  }
  return 0;
}

Compiler output:
a.cc:9:15: warning: multi-character character constant [-Wmultichar]
    9 |         cout<<'hon'<<endl;
      |               ^~~~~
a.cc:13:11: warning: multi-character character constant [-Wmultichar]
   13 |     cout<<'pon'<<endl;
      |           ^~~~~
a.cc:16:11: warning: multi-character character constant [-Wmultichar]
   16 |     cout<<'bon'<<endl;
      |           ^~~~~
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:3:12: error: expected primary-expression before 'long'
    3 | #define ll long long
      |            ^~~~
a.cc:6:1: note: in expansion of macro 'll'
    6 | ll n;
      | ^~
a.cc:3:12: error: expected '}' before 'long'
    3 | #define ll long long
      |            ^~~~
a.cc:6:1: note: in expansion of macro 'll'
    6 | ll n;
      | ^~
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:7:1: error: 'cin' does not name a type
    7 | cin>>n;
      | ^~~
a.cc:8:3: error: expected unqualified-id before 'if'
    8 |   if((n%10)==2 )|| ((n%10)==4) || ((n%10)==5) || ((n%10) ==7) || ((n%10)==9)){
      |   ^~
a.cc:12:3: error: expected unqualified-id before 'else'
   12 |   else if(((n%10)==0)|| ((n%10)==1) ||  ((n%10)==6)  || ((n%10)==8)){
      |   ^~~~
a.cc:15:3: error: expected unqualified-id before 'else'
   15 |   else if((n%10)==3){
      |   ^~~~
a.cc:19:3: error: expected unqualified-id before 'return'
   19 |   return 0;
      |   ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

#include<bits/stdc++.h>
#include<cmath>
using namespace std;
int main()
{
  long long int n;cin>>n;
  if((n%10)==3)
    cout<<"bon"<<"\n";
  else if((n%10)==0 || (n%10)==1 || (n%10)==6  (n%10)==8)
    cout<<"pon"<<"\n";
  else
     cout<<"hon"<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:48: error: expression cannot be used as a function
    9 |   else if((n%10)==0 || (n%10)==1 || (n%10)==6  (n%10)==8)
      |                                             ~~~^~~~~~
Language: C++

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"<<endl;
    }
    else if (N%10==0 ||N%10==1 ||N%10==6 ||N%10==8 )
    {
        cout<<"pon"<<endl;
    }
    else if (N%10==3)
    {
        cout<<"bon"<<endl;
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>> N;
      |     ^~~
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:8:9: error: 'cout' was not declared in this scope
    8 |         cout<<"hon"<<endl;
      |         ^~~~
a.cc:8:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:22: error: 'endl' was not declared in this scope
    8 |         cout<<"hon"<<endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:12:9: error: 'cout' was not declared in this scope
   12 |         cout<<"pon"<<endl;
      |         ^~~~
a.cc:12:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:22: error: 'endl' was not declared in this scope
   12 |         cout<<"pon"<<endl;
      |                      ^~~~
a.cc:12:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:16:9: error: 'cout' was not declared in this scope
   16 |         cout<<"bon"<<endl;
      |         ^~~~
a.cc:16:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:22: error: 'endl' was not declared in this scope
   16 |         cout<<"bon"<<endl;
      |                      ^~~~
a.cc:16:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n)                    \
  for (int i = 0; i < (int)(n); i++) \
    ;

#define _GLIBCXX_DEBUG
#define _LIBCPP_DEBUG 0

int main() {
  int n;
  cin >> n;

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


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

import java.util.*;

class Main
{
  public static void main(String [] args)
  {
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    if(n%1 == 2 || n%1 = 4 || n%1 = 5 || n%1 == 7 || n%1 == 9)
      System.out.println("hon");
    if(n%1 == 0 || n%1 = 1 || n%1 = 6 || n%1 == 8)
      System.out.println("pon");
    if(n%1 == 3)
      System.out.println("bon");
  }
}

Compiler output:
Main.java:9: error: bad operand types for binary operator '||'
    if(n%1 == 2 || n%1 = 4 || n%1 = 5 || n%1 == 7 || n%1 == 9)
                ^
  first type:  boolean
  second type: int
Main.java:9: error: bad operand types for binary operator '||'
    if(n%1 == 2 || n%1 = 4 || n%1 = 5 || n%1 == 7 || n%1 == 9)
                           ^
  first type:  int
  second type: int
Main.java:9: error: bad operand types for binary operator '||'
    if(n%1 == 2 || n%1 = 4 || n%1 = 5 || n%1 == 7 || n%1 == 9)
                                      ^
  first type:  int
  second type: boolean
Main.java:11: error: bad operand types for binary operator '||'
    if(n%1 == 0 || n%1 = 1 || n%1 = 6 || n%1 == 8)
                ^
  first type:  boolean
  second type: int
Main.java:11: error: bad operand types for binary operator '||'
    if(n%1 == 0 || n%1 = 1 || n%1 = 6 || n%1 == 8)
                           ^
  first type:  int
  second type: int
Main.java:11: error: bad operand types for binary operator '||'
    if(n%1 == 0 || n%1 = 1 || n%1 = 6 || n%1 == 8)
                                      ^
  first type:  int
  second type: boolean
6 errors
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
	string n;
  	cin >> n;
  	int sz = n.size();
  	int bon,pon,hon;
  	bon,pon,hon = 0;
  	for(int i = 0; i<sz; i++){
    	if(n[i] == '2' ||n[i] == '4'||  n[i] == '5' || n[i] == '7' || n[i] == '9')
          hon++;
      	else if(n[i] == '0'|| n[i] == '1' || n[i] == '6' || n[i] == '8')
          pon++;
      	else
          bon++;
    }
  	if(hon>0)
      count << "hon"<<endl;
  	else if(pon > 0)
      cout << "pon\n";
  	else
      cout << "bon\n";
  
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: invalid operands of types '<unresolved overloaded function type>' and 'const char [4]' to binary 'operator<<'
   20 |       count << "hon"<<endl;
      |       ~~~~~~^~~~~~~~
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:11:15: error: expected ';' before '{' token
   11 |     else (N=3)
      |               ^
      |               ;
   12 |     {
      |     ~          
main.c:19:1: error: expected declaration or statement at end of input
   19 | }
      | ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:11:17: error: expected ';' before '{' token
   11 |     else (N='3')
      |                 ^
      |                 ;
   12 |     {
      |     ~            
main.c:19:1: error: expected declaration or statement at end of input
   19 | }
      | ^
Language: C

#include<stdio.h>
main()
{
    int N ;
    scanf ("%d",&N)
    N%10;
    if ( N=='2', N=='4', N=='5', N=='7', N=='9');
    {
          printf("hon\n") 
    }
    else (N='3') ;
    {
         printf("bon\n") 
    }
    else if
    {
        printf("pon\n")
    }
    return 0 ;
}
Comment in Markdown

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main()
      | ^~~~
main.c: In function 'main':
main.c:5:20: error: expected ';' before 'N'
    5 |     scanf ("%d",&N)
      |                    ^
      |                    ;
    6 |     N%10;
      |     ~               
main.c:9:26: error: expected ';' before '}' token
    9 |           printf("hon\n")
      |                          ^
      |                          ;
   10 |     }
      |     ~                     
main.c:11:5: error: 'else' without a previous 'if'
   11 |     else (N='3') ;
      |     ^~~~
main.c:13:25: error: expected ';' before '}' token
   13 |          printf("bon\n")
      |                         ^
      |                         ;
   14 |     }
      |     ~                    
main.c:15:5: error: 'else' without a previous 'if'
   15 |     else if
      |     ^~~~
main.c:16:5: error: expected '(' before '{' token
   16 |     {
      |     ^
      |     (
main.c: At top level:
main.c:21:1: error: unknown type name 'Comment'
   21 | Comment in Markdown
      | ^~~~~~~
main.c:21:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Markdown'
   21 | Comment in Markdown
      |            ^~~~~~~~
Language: C

#include<stdio.h>
main()
{
    int N ;
    N%10;
    if ( N=='2', N=='4', N=='5', N=='7', N=='9');
    {
          printf("hon\n") ;
    }
    else (N='3') ;
    {
         printf("bon\n") ;
    }
    else if
    {
        printf("pon\n")
    }
    return 0 ;
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main()
      | ^~~~
main.c: In function 'main':
main.c:10:5: error: 'else' without a previous 'if'
   10 |     else (N='3') ;
      |     ^~~~
main.c:14:5: error: 'else' without a previous 'if'
   14 |     else if
      |     ^~~~
main.c:15:5: error: expected '(' before '{' token
   15 |     {
      |     ^
      |     (
Language: C

#include<stdio.h>
main()
{
    int N ;
    N%10;
    if ( N=='2', N==4, N==5, N=='7', N=='9');
    {
          printf("hon\n") ;
    }
    else (N='3') ;
    {
         printf("bon\n") ;
    }
    else if
    {
        printf("pon\n")
    }
    return 0 ;
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main()
      | ^~~~
main.c: In function 'main':
main.c:10:5: error: 'else' without a previous 'if'
   10 |     else (N='3') ;
      |     ^~~~
main.c:14:5: error: 'else' without a previous 'if'
   14 |     else if
      |     ^~~~
main.c:15:5: error: expected '(' before '{' token
   15 |     {
      |     ^
      |     (
Language: Java

import java.util.*;

public class Main{
public static void main(String[] args)
{
	Scanner sc=new Scanner(System.in);
  int k=sc.nextInt();
  String s=sc.next();
  
  if(s.length()<=k)
    System.out.println(s);
  
  else
  {
		s=s.substr(0,k) +"...";
      System.out.print(s);
    
  }
  
 
}
}


Compiler output:
Main.java:15: error: cannot find symbol
		s=s.substr(0,k) +"...";
		   ^
  symbol:   method substr(int,int)
  location: variable s of type String
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long

int main(){
	int n;
	cin >> n;

	if(n == 3) cout << "bon" << endl;
	else if(n = 0 || n = 1 || n = 6 || n = 8) cout << "pon" << endl;
	else cout << "hon" << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:41: error: lvalue required as left operand of assignment
   11 |         else if(n = 0 || n = 1 || n = 6 || n = 8) cout << "pon" << endl;
      |                                       ~~^~~~
Language: C

#include<stdio.h>
int main()
{
    int N ;
    scanf("%d", &N);
    N/2 ;
    if(N=='3'){
        printf("bon\n");
    }
    else if(N=='0' || N=='1' || N=='6' || N=='8') 
       printf("pon\n");
    else
        printf("hon\n");
    return 0;

Compiler output:
main.c: In function 'main':
main.c:14:5: error: expected declaration or statement at end of input
   14 |     return 0;
      |     ^~~~~~
Language: C

#include<stdio.h>
int main()
{
    int N ;
    scanf("%d", &N);
    N/2 ;
    if(x=='3'){
        printf("bon\n");
    }
    else if(x=='0' || x=='1' || x=='6' || x=='8') 
       printf("pon\n");
    else
        printf("hon\n");
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:8: error: 'x' undeclared (first use in this function)
    7 |     if(x=='3'){
      |        ^
main.c:7:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: expected primary-expression before '||' token
    8 |   if(n==2|| 4||5|| 7|| || 9)
      |                        ^~
Language: Java

import java.util.Scanner;class Main{public static void main(String[] args){Scanner scan = new Scanner(System.in);byte b = scan.nextByte()%10;switch(b){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:1: error: incompatible types: possible lossy conversion from int to byte
import java.util.Scanner;class Main{public static void main(String[] args){Scanner scan = new Scanner(System.in);byte b = scan.nextByte()%10;switch(b){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;}}}
                                                                                                                                         ^
1 error
Language: C++

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

int main(){
  int n;
  scanf("%d", &n);
  
  switch(n % 10){
    case 2:
    case 4:
    case 5:
    case 7:
    case 9:
      puts("hon");
      breake;
    case 0:
    case 1:
    case 6:
    case 8:
      puts("pon");
      break;
    case 3:
      puts("bon");
      break;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: 'breake' was not declared in this scope
   15 |       breake;
      |       ^~~~~~
Language: C++

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

int main(){
  int n;
  cin >> n;
  
  switch(n % 10){
    case 2:
    case 4:
    case 5:
    case 7:
    case 9:
      puts("hon");
      breake;
    case 0:
    case 1:
    case 6:
    case 8:
      puts("pon");
      break;
    case 3:
      puts("bon");
      break;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: 'breake' was not declared in this scope
   15 |       breake;
      |       ^~~~~~
Language: C++

#include<iostream>
using namespace std;

void main(){
	int n;
	cin >> n;

	switch(n % 10){
	case 2:
	case 4:
	case 5:
	case 7:
	case 9:
		cout << "hon" << endl;
		break;

	case 0:
	case 1:
	case 6:
	case 8:
		cout << "pon" << endl;
		break;

	case 3:
		cout << "bon" << endl;
		break;
	}
	
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main(){
      | ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    char a[3];
    int x=2;
    cin >> a;
    if(a[2]=='\n')x=1;
    else(a[1]=='\n')x=0;

    if(a[x]=='2' || a[x] == '4' || a[x] == '5' || a[x] == '7'|| a[x]=='9')    cout << "hon";
    else if(a[x]=='0' || a[x]== '1' || a[x] == '6' || a[x]== '8')    cout << "pon";
    else cout << "hon";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: expected ';' before 'x'
    8 |     else(a[1]=='\n')x=0;
      |                     ^
      |                     ;
Language: C++

#include<iostream>
using namespace std;
int main(){
    char a[3];
    int x=2;
    cin >> a;
    if(a[2]=='\n')x=1;
    else(a[1]=-'\n')x=0;

    if(a[x]=='2' || a[x] == '4' || a[x] == '5' || a[x] == '7'|| a[x]=='9')    cout << "hon";
    else if(a[x]=='0' || a[x]== '1' || a[x] == '6' || a[x]== '8')    cout << "pon";
    else cout << "hon";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: expected ';' before 'x'
    8 |     else(a[1]=-'\n')x=0;
      |                     ^
      |                     ;
Language: C

include <stdio.h>
int main()
{
 int N;
 scanf("%d",&N);
 int ones=N% 10;
 if(ones==2||4||5||7||9)
{
 printf("pon");
}
else if (ones==0||1||6||8)
{
 printf("hon");
}
}

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

include <stdio.h>
int main()
{
 int n;
 scanf("%d",&N);
 int ones=N% 10;
 if(ones==2||4||5||7||9)
{
 printf("pon");
}
else if (ones==0||1||6||8)
{
 printf("hon");
}
}

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

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

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

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

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

#include <cstdio>
#include <string>

using namespace std;

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

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'cin' was not declared in this scope
    9 |         cin>>N;
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <string>
  +++ |+#include <iostream>
    3 | 
a.cc:11:25: error: lvalue required as left operand of assignment
   11 |         if(q==2 || q==4 || q=5 || q==7 || q==9) cout<<"hon"<<endl;
      |            ~~~~~~~~~~~~~^~~~
a.cc:11:49: error: 'cout' was not declared in this scope
   11 |         if(q==2 || q==4 || q=5 || q==7 || q==9) cout<<"hon"<<endl;
      |                                                 ^~~~
a.cc:11:49: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:62: error: 'endl' was not declared in this scope
   11 |         if(q==2 || q==4 || q=5 || q==7 || q==9) cout<<"hon"<<endl;
      |                                                              ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <string>
  +++ |+#include <ostream>
    3 | 
a.cc:12:47: error: 'cout' was not declared in this scope
   12 |         else if(q==0 || q==1 || q==6 || q==8) cout<<"pon"<<endl
      |                                               ^~~~
a.cc:12:47: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:60: error: 'endl' was not declared in this scope
   12 |         else if(q==0 || q==1 || q==6 || q==8) cout<<"pon"<<endl
      |                                                            ^~~~
a.cc:12:60: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

n = int(input())
n %= 10

h = [2,4,5,7,9]
p = [0,1,6,8]
b = [3]

if n in h:
    print('hon')
if n in p:
    print('pon')
if n in b:
    print('bon')

Compiler output:
a.cc:9:11: warning: multi-character character constant [-Wmultichar]
    9 |     print('hon')
      |           ^~~~~
a.cc:11:11: warning: multi-character character constant [-Wmultichar]
   11 |     print('pon')
      |           ^~~~~
a.cc:13:11: warning: multi-character character constant [-Wmultichar]
   13 |     print('bon')
      |           ^~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include <stdio.h>

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

    switch(n%10){
        case 2:
        case 4:
        case 5:
        case 7:
        case 9:
           puts("bon");
        break;
         case 0:
         case 1:
         case 6:
         case 8:
           puts("pon");
           break;
         case 3:
            puts("bon");
            break;
    }
    return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:20: error: expected ';' before 'switch'
    5 |     scanf("%d", &n)
      |                    ^
      |                    ;
    6 | 
    7 |     switch(n%10){
      |     ~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: redeclaration of 'int s'
    5 |       int s=N%100,s=n%10;
      |                   ^
a.cc:5:11: note: 'int s' previously declared here
    5 |       int s=N%100,s=n%10;
      |           ^
a.cc:5:21: error: 'n' was not declared in this scope
    5 |       int s=N%100,s=n%10;
      |                     ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected '}' before 'else'
    8 |         else if(n==0 || n==1 || n==6 || n==8){
      |         ^~~~
a.cc:6:47: note: to match this '{'
    6 |       if(n==2 || n==4 || n==5 || n==7 || n==9){
      |                                               ^
a.cc: At global scope:
a.cc:15:3: error: expected declaration before '}' token
   15 |   }
      |   ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected '}' before 'else'
    9 |         else if(n==0,1,6,8){
      |         ^~~~
a.cc:7:23: note: to match this '{'
    7 |       if(n==2,4,5,7,9){
      |                       ^
a.cc: At global scope:
a.cc:16:3: error: expected declaration before '}' token
   16 |   }
      |   ^
Language: C

#include <stdio.h>

int main(){
  int n , s;
	scanf("%d", &n);
  while(n/10>0){
	n = n%10;
  }
  s = n;
  if(s==2 || s==4 || s==5 || s==7 || s==9){
	printf("hon\n");
  }else if(s==0 || s==1 || s==6 || s==8){
	printf("pon\n");
  }else{
	printf("bon\n");
  }
  }
  
  return 0;
}

Compiler output:
main.c:19:3: error: expected identifier or '(' before 'return'
   19 |   return 0;
      |   ^~~~~~
main.c:20:1: error: expected identifier or '(' before '}' token
   20 | }
      | ^
Language: Java

import java.util.Scanner;

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

        System.out.println("Nを入力してください。");

        final int inputNum = sc.nextInt();

        final int digit1 = inputNum % 10;

        switch (digit1) {
            case 2, 4, 5, 7, 9:
                System.out.println("hon");
                break;
            case 0, 1, 6, 8:
                System.out.println("pon");
                break;
            case 3:
                System.out.println("bon");
                break;
        }

        sc.close();

    }
}

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

#include <iostream>
#include <cstdio>
#include <string>


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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: 'string' was not declared in this scope
    8 | string s;
      | ^~~~~~
a.cc:8:1: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:10:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 | cin >> k;
      | ^~~
      | std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:8: error: 's' was not declared in this scope
   11 | cin >> s;
      |        ^
a.cc:16:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 | cout << s;
      | ^~~~
      | 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>
#include <cstdio>
#include <string>


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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: 'string' was not declared in this scope
    8 | string s;
      | ^~~~~~
a.cc:8:1: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:10:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 | cin >> k;
      | ^~~
      | std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:8: error: 's' was not declared in this scope
   11 | cin >> s;
      |        ^
a.cc:16:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 | cout << s;
      | ^~~~
      | 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>
#include <cstdio>
#include <string>
using std : : string;

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


Compiler output:
a.cc:4:7: error: expected nested-name-specifier before 'std'
    4 | using std : : string;
      |       ^~~
a.cc: In function 'int main()':
a.cc:8:1: error: 'string' was not declared in this scope
    8 | string s;
      | ^~~~~~
a.cc:8:1: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:10:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 | cin >> k;
      | ^~~
      | std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:8: error: 's' was not declared in this scope
   11 | cin >> s;
      |        ^
a.cc:16:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 | cout << s;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

// ABC168A.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//

#include "pch.h"
#include <iostream>
using namespace std;
int main()
{
	int N;
	cin >> N;
	if (N%10==3)
	{
		cout << "bon" << endl;
	}
	else if (N % 10 == 0 || N % 10 == 1 || N % 10 == 6 || N % 10 == 8)
	{
		cout << "pon" << endl;
	}
	else {
		cout << "hon" << endl;
	}
}


Compiler output:
a.cc:4:10: fatal error: pch.h: No such file or directory
    4 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.