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

#include<bits/stdc++.h>
#include<unordered_set>
#include<unordered_map>
#include <algorithm> 
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i,n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<"\n"
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES\n" : "NO\n"  )
#define Yes(n) cout << ((n) ? "Yes\n" : "No\n"  )
#define mp make_pair
#define sz(x) (ll)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef tuple<ll,ll,ll> tll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vvll = vector<vll>;
using vstr = vector<string>;
using vc = vector<char>;
using vvc = vector<vc>;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
template<class T> inline bool chmax(T& a, T b) { 
 if (a < b) { a = b; return true; } return false; 
}
template<class T> inline bool chmin(T& a, T b) {
 if (a > b) { a = b; return true; } return false; 
}
ll dx[4]={0,1,0,-1};
ll dy[4]={1,0,-1,0};

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  cin>>s;
  if(s[sz(s)-1]=='s'){
    cout<<s<<"es"<<endl;
  }
  else{
    cout<<s<<'s'<<endl;
  }
}
}


Compiler output:
a.cc:32:21: error: 'vll' was not declared in this scope; did you mean 'tll'?
   32 | using vvll = vector<vll>;
      |                     ^~~
      |                     tll
a.cc:32:24: error: template argument 1 is invalid
   32 | using vvll = vector<vll>;
      |                        ^
a.cc:32:24: error: template argument 2 is invalid
a.cc:60:1: error: expected declaration before '}' token
   60 | }
      | ^
Language: Java

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class A {
    public static void main(String[] args) {
        FastScanner scanner = new FastScanner();
        String s = scanner.nextToken();
        if (s.charAt(s.length() - 1) == 's')
            s = s + "es";
        else
            s = s + "s";
        System.out.println(s);
    }
}

class FastScanner {
    BufferedReader br;
    StringTokenizer st;

    public FastScanner(String s) {
        try {
            br = new BufferedReader(new FileReader(s));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    public FastScanner() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String nextToken() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(nextToken());
    }

    long nextLong() {
        return Long.parseLong(nextToken());
    }

    double nextDouble() {
        return Double.parseDouble(nextToken());
    }
}

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

//vяпay
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define flash ios::sync_with_stdio(false);cin.tie(0);
const int mod = 1e9+7;
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    string s;
    cin >> s;
    string p = 'es';
    string q = 's';
    if(s[s.size()-1] == 's'){
      cout << s.append(p) << endl;
    }
    else
      cout << s.append(q) << endl;
    return 0;
}

Compiler output:
a.cc:13:16: warning: multi-character character constant [-Wmultichar]
   13 |     string p = 'es';
      |                ^~~~
a.cc: In function 'int main()':
a.cc:13:16: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
a.cc:14:16: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   14 |     string q = 's';
      |                ^~~
Language: C++

//vяпay
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define flash ios::sync_with_stdio(false);cin.tie(0);
const int mod = 1e9+7;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    string s;
    cin >> s;
    string p = 'es';
    string q = 's';
    if(s[s.size()-1] == 's'){
      cout << s.sppend(p) << endl;
    }
    else
      cout << s.append(q) << endl;
    return 0;
}


Compiler output:
a.cc:13:16: warning: multi-character character constant [-Wmultichar]
   13 |     string p = 'es';
      |                ^~~~
a.cc: In function 'int main()':
a.cc:13:16: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
a.cc:14:16: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   14 |     string q = 's';
      |                ^~~
a.cc:16:17: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sppend'; did you mean 'append'?
   16 |       cout << s.sppend(p) << endl;
      |                 ^~~~~~
      |                 append
Language: C++

#include<iostream>
using namespace std;
int main(){
	string s;
  	cin>>s;
  	int n=s.length()-1;
  	if(s[n]=="s")s+="es";
  	else s+="s";
  	cout<<s;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |         if(s[n]=="s")s+="es";
Language: C

#include<stdio.h>
int main(void){
  char str[1000], pstr;
  scanf("%s", &str);
  pstr=str;
  while(*(pstr+1)!='\0') pstr++;
  if(*pstr=='s'){
    *(pstr+1)='e';
    *(pstr+2)='s';
    *(pstr+3)='\0';
  }else{
    *(pstr+1)='s';
    *(pstr+2)='\0';
  }
  printf("%s",str);
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:5:7: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
    5 |   pstr=str;
      |       ^
main.c:6:9: error: invalid type argument of unary '*' (have 'int')
    6 |   while(*(pstr+1)!='\0') pstr++;
      |         ^~~~~~~~~
main.c:7:6: error: invalid type argument of unary '*' (have 'int')
    7 |   if(*pstr=='s'){
      |      ^~~~~
main.c:8:5: error: invalid type argument of unary '*' (have 'int')
    8 |     *(pstr+1)='e';
      |     ^~~~~~~~~
main.c:9:5: error: invalid type argument of unary '*' (have 'int')
    9 |     *(pstr+2)='s';
      |     ^~~~~~~~~
main.c:10:5: error: invalid type argument of unary '*' (have 'int')
   10 |     *(pstr+3)='\0';
      |     ^~~~~~~~~
main.c:12:5: error: invalid type argument of unary '*' (have 'int')
   12 |     *(pstr+1)='s';
      |     ^~~~~~~~~
main.c:13:5: error: invalid type argument of unary '*' (have 'int')
   13 |     *(pstr+2)='\0';
      |     ^~~~~~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	string s;
  	cin>>s;
  	if(s[s.size()-1]=='s')
      	s+="es"
     else
      	s+="s";
  	cout<<s;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before 'else'
    8 |         s+="es"
      |                ^
      |                ;
    9 |      else
      |      ~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	string s;
  	cin>>s;
  	if(s[s.size()-1]=='s')
      	s+="es"
     esle
      	s+="s";
  	cout<<s;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before 'esle'
    8 |         s+="es"
      |                ^
      |                ;
    9 |      esle
      |      ~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	string s;
  	cin>>s;
  	if(s[s.size()-1]=='s')
      	s+="es"
     esle
      	s+="s";
  	cout<<s;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ';' before 'esle'
    7 |         s+="es"
      |                ^
      |                ;
    8 |      esle
      |      ~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin>>s;
  l=s.length();
  if(s[l-1]=='s')
    cout<<s<<"es"<<"\n";
  else
    cout<<s<<"s"<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'l' was not declared in this scope
    9 |   l=s.length();
      |   ^
Language: Java


import java.util.Scanner;


public  class main {
	public static void main( String[] args) {
        Scanner input = new Scanner(System.in);
        String S = input.next();
        if(S.endsWith("s")) {
            System.out.println(S+"es");
        }
        else {
            System.out.println(S+"s");
        }


    }
}

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

 class main {
	public static void main( String[] args) {
        Scanner input = new Scanner(System.in);
        String S = input.next();
        if(S.endsWith("s")) {
            out.println(S+"es");
        }
        else {
            out.println(S+"s");
        }


    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner input = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class main
Main.java:3: error: cannot find symbol
        Scanner input = new Scanner(System.in);
                            ^
  symbol:   class Scanner
  location: class main
Main.java:6: error: cannot find symbol
            out.println(S+"es");
            ^
  symbol:   variable out
  location: class main
Main.java:9: error: cannot find symbol
            out.println(S+"s");
            ^
  symbol:   variable out
  location: class main
4 errors
Language: Java

import static java.lang.System.out;

//import java.lang.reflect.Array;
//import java.math.BigInteger;
//import java.util.Arrays;
//import java.util.HashMap;
import java.util.Scanner;

    public static void main( String[] args) {
        Scanner input = new Scanner(System.in);
        String S = input.next();
        if(S.endsWith("s")) {
            out.println(S+"es");
        }
        else {
            out.println(S+"s");
        }


     }


Compiler output:
Main.java:9: 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

import static java.lang.System.out;

//import java.lang.reflect.Array;
//import java.math.BigInteger;
//import java.util.Arrays;
//import java.util.HashMap;
import java.util.Scanner;


public class justAClass {

    public static void main( String[] args) {
        Scanner input = new Scanner(System.in);
        String S = input.next();
        if(S.endsWith("s")) {
            out.println(S+"es");
        }
        else {
            out.println(S+"s");
        }


     }
}

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

package com.butugey;
import static java.lang.System.out;

//import java.lang.reflect.Array;
//import java.math.BigInteger;
//import java.util.Arrays;
//import java.util.HashMap;
import java.util.Scanner;


public class justAClass {

    public static void main( String[] args) {
        Scanner input = new Scanner(System.in);
        String S = input.next();
        if(S.endsWith("s")) {
            out.println(S+"es");
        }
        else {
            out.println(S+"s");
        }


     }



}



/*/private static void printArray(int[] NAMEOFARRAY) {
        for (int elem:chargeLevel) {
            out.print(elem +" ");
        }
        out.print("\n");
    */






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

import java.util.Scanner;


public class justAClass {

    public static void main( String[] args) {
        Scanner input = new Scanner(System.in);
        String S = input.next();
        if(S.endsWith("s")) {
            out.println(S+"es");
        }
        else {
            out.println(S+"s");
        }


     }
}

Compiler output:
Main.java:4: error: class justAClass is public, should be declared in a file named justAClass.java
public class justAClass {
       ^
Main.java:10: error: cannot find symbol
            out.println(S+"es");
            ^
  symbol:   variable out
  location: class justAClass
Main.java:13: error: cannot find symbol
            out.println(S+"s");
            ^
  symbol:   variable out
  location: class justAClass
3 errors
Language: Java

import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
import java.util.Arrays;

public class bansai19 {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final List<Integer> list = new ArrayList<>();
    //final List<Integer> list2 = new ArrayList<>();
    //final List<Long> list3 = new ArrayList<>();

    String s = sc.next();

    if(s.charAt(s.length() - 1) == 's'){
        System.out.println(s + "es");
    }else{
        System.out.println(s + "s");
    }

   

    

    




    







}
}

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
if(s[s.length()-1]=='s']
cout<<s<<"es";
else
cout<<s<<"s";
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: expected ')' before ']' token
    7 | if(s[s.length()-1]=='s']
      |   ~                    ^
      |                        )
a.cc:7:24: error: expected primary-expression before ']' token
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);		
		String s = sc.next();
        if(s.charAt(s.length-1)=='s'){s+="es";}
        else{s+="s";}
		System.out.println(s);
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
        if(s.charAt(s.length-1)=='s'){s+="es";}
                     ^
  symbol:   variable length
  location: variable s of type String
1 error
Language: C

#include <stdio.h>

int	main(void){
	char S[1010];
	int i;

	scanf("%s", S);
	i = 0;
	while(S[i] != 0){
		i++;
	}
	if (S[i - 1] = 's'){
		S = strcat(S, "es");
	} else {
		S = strcat(S, "s");
	}
	printf("%s", S);
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:13:21: error: implicit declaration of function 'strcat' [-Wimplicit-function-declaration]
   13 |                 S = strcat(S, "es");
      |                     ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcat'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:13:21: warning: incompatible implicit declaration of built-in function 'strcat' [-Wbuiltin-declaration-mismatch]
   13 |                 S = strcat(S, "es");
      |                     ^~~~~~
main.c:13:21: note: include '<string.h>' or provide a declaration of 'strcat'
main.c:13:19: error: assignment to expression with array type
   13 |                 S = strcat(S, "es");
      |                   ^
main.c:15:21: warning: incompatible implicit declaration of built-in function 'strcat' [-Wbuiltin-declaration-mismatch]
   15 |                 S = strcat(S, "s");
      |                     ^~~~~~
main.c:15:21: note: include '<string.h>' or provide a declaration of 'strcat'
main.c:15:19: error: assignment to expression with array type
   15 |                 S = strcat(S, "s");
      |                   ^
Language: C++

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

int main{
  string s;
  cin >> s;
  
  int l = s.size();
  if(s.at(l-1) == 's') s.push_back('e');
  s.push_back('s');
  
  cout << s << endl;
}


Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:10: error: expected primary-expression before 's'
    5 |   string s;
      |          ^
a.cc:5:10: error: expected '}' before 's'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin >> s;
      |   ^~~
a.cc:8:11: error: 's' was not declared in this scope
    8 |   int l = s.size();
      |           ^
a.cc:9:3: error: expected unqualified-id before 'if'
    9 |   if(s.at(l-1) == 's') s.push_back('e');
      |   ^~
a.cc:10:3: error: 's' does not name a type
   10 |   s.push_back('s');
      |   ^
a.cc:12:3: error: 'cout' does not name a type
   12 |   cout << s << endl;
      |   ^~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C

#include<iostream>
using namespace std;
int main()
{
    int es,s;
    char n;
    for(int i=1;i<=n;i--)
    if(n-=89)
    n=n+es;
    cout<<n;
    return 0;
    else
    n=n+s;
    cout<<n;
    return 0;
}

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

#include <bits/stdc++.h>

int main{
  string s;
  cin >> s;
  
  int l = s.size();
  if(s.at(l-1) == 's') s.push_back('e');
  s.push_back('s');
  
  cout << s << endl;
}

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string s;
      |   ^~~~~~
a.cc:4:3: 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:4:10: error: expected '}' before 's'
    4 |   string s;
      |          ^
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:3: error: 'cin' does not name a type
    5 |   cin >> s;
      |   ^~~
a.cc:7:11: error: 's' was not declared in this scope
    7 |   int l = s.size();
      |           ^
a.cc:8:3: error: expected unqualified-id before 'if'
    8 |   if(s.at(l-1) == 's') s.push_back('e');
      |   ^~
a.cc:9:3: error: 's' does not name a type
    9 |   s.push_back('s');
      |   ^
a.cc:11:3: error: 'cout' does not name a type
   11 |   cout << s << endl;
      |   ^~~~
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C++

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

int main(){
  string s;
  cin >> s;
  if(s[s.length] == 's') {
   	cout << s + "es" << endl; 
  } else {
    cout << s + 's' << endl; 
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: invalid use of non-static member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
    7 |   if(s[s.length] == 's') {
      |       ^
In file included from /usr/include/c++/14/string:54,
                 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/basic_string.h:1083:7: note: declared here
 1083 |       length() const _GLIBCXX_NOEXCEPT
      |       ^~~~~~
Language: C++

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

int main(){
  string s;
  cin >> s;
  if(s[s.length] == 's') {
   	cout << s + "es" << endl; 
  } else {
    cout << s + 's' << endl; 
  }
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesoace'
    2 | using namesoace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s;
      |   ^~~~~~
a.cc:5:3: 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:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> s;
      |   ^~~
      |   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:6:10: error: 's' was not declared in this scope
    6 |   cin >> s;
      |          ^
a.cc:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         cout << s + "es" << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |         cout << s + "es" << endl;
      |                             ^~~~
      |                             std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     cout << s + 's' << endl;
      |     ^~~~
      |     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:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |     cout << s + 's' << endl;
      |                        ^~~~
      |                        std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  string s;
  cin >> s;
  if(s.at(s.size()-1)=='s'){
    cout << inp << "es" << endl;
  }else{
     cout << inp << "s" << endl;
   }
  	
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'inp' was not declared in this scope; did you mean 'int'?
    8 |     cout << inp << "es" << endl;
      |             ^~~
      |             int
a.cc:10:14: error: 'inp' was not declared in this scope; did you mean 'int'?
   10 |      cout << inp << "s" << endl;
      |              ^~~
      |              int
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  string s;
  cin >> s;
  if(s.at(s.size()-1)=='s'){
    cout << inp << "es" << endl;
   else{
     cout << inp << "s" << endl;
   }
  	
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'inp' was not declared in this scope; did you mean 'int'?
    8 |     cout << inp << "es" << endl;
      |             ^~~
      |             int
a.cc:9:4: error: expected '}' before 'else'
    9 |    else{
      |    ^~~~
a.cc:7:28: note: to match this '{'
    7 |   if(s.at(s.size()-1)=='s'){
      |                            ^
a.cc:10:14: error: 'inp' was not declared in this scope; did you mean 'int'?
   10 |      cout << inp << "s" << endl;
      |              ^~~
      |              int
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  string inp;
  cin >> inp;
  if(s.at(s.size()-1)=='s'){
    cout << inp << "es" << endl;
   else{
     cout << inp << "s" << endl;
   }
  	
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: 's' was not declared in this scope
    7 |   if(s.at(s.size()-1)=='s'){
      |      ^
a.cc:9:4: error: expected '}' before 'else'
    9 |    else{
      |    ^~~~
a.cc:7:28: note: to match this '{'
    7 |   if(s.at(s.size()-1)=='s'){
      |                            ^
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main(){
  strign s;
  if(s.at(s.size()) == 's'){
    cout << s << "es";
  }
  else{
    cout << s << "s";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'strign' was not declared in this scope; did you mean 'stdin'?
    6 |   strign s;
      |   ^~~~~~
      |   stdin
a.cc:7:6: error: 's' was not declared in this scope
    7 |   if(s.at(s.size()) == 's'){
      |      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n,a,b;
  cin>>n;
  int c=0;
  string ans="NO";
  for(int i=0;i<n;i++)
  {
    cin>>a>>b
    if(a==b)
      c+=1;
    if(a!=b)
      c=0;
    if(c>=3)
    	ans="YES";
  }
    cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: expected ';' before 'if'
   11 |     cin>>a>>b
      |              ^
      |              ;
   12 |     if(a==b)
      |     ~~
Language: C++

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

int main(){
  ll n,m,p;
  cin>>n>>m>>p;
  cout<<atcoder::pow_mod(n,p,m)<<endl;
  return 0;
}

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

#include <bits/stc++.h>
using namespace std;
int main()
{
  string s;
  cin>>s;
  int n=s.size();
  if(s[n-1]=='s'){
    s+="es";
  }
  else{
    s+="s";
  }
  
}

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

#include "bits/stdc++.h"
using namespace std;
#define MODULO 1000000007
#define PI 3.14159265359
typedef long long int ll;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(NULL);
	cout.tie(NULL);
	string s;
	cin>>s;
	int n=s.length();
	if(s[i]=='s')
	cout<<"es";
	else
	cout<<"s";	
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: 'i' was not declared in this scope
   14 |         if(s[i]=='s')
      |              ^
Language: C++

#include<bits/stdc++.h> 
using namespace std;
string word; 
void solve(); 
int main() 
{ 
   ios_base::sync_with_stdio(false);cin.tie(NULL); 
   
   /*#ifndef ONLINE_JUDGE 
   freopen("input.txt", "r", stdin); 
   freopen("error.txt", "w", stderr); 
   freopen("output.txt", "w", stdout); 
   #endif*/ 
   
   int t=1; 

   ${2:/*is Single Test case?*/}cin>>t; 
   while(t--) 
   { 

      solve(); 
      cout<<"\n"; 
   } 
   
   cerr<<"time taken : "<<(float)clock()/CLOCKS_PER_SEC<<" secs"<<endl; 
   return 0; 
} 
void solve() 
{ 
      cin >> word;
      if (word.back() = 's'){
         word += "es";
      }
      else {
         word += "s";
      }
      cout << word;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:17:4: error: '$' was not declared in this scope
   17 |    ${2:/*is Single Test case?*/}cin>>t;
      |    ^
Language: C++

#include<bits/stdc++.h> 
using namespace std; 
void solve(); 
int main() 
{ 
   ios_base::sync_with_stdio(false);cin.tie(NULL); 
   
   /*#ifndef ONLINE_JUDGE 
   freopen("input.txt", "r", stdin); 
   freopen("error.txt", "w", stderr); 
   freopen("output.txt", "w", stdout); 
   #endif*/ 
   
   int t=1; 
   string word;
   ${2:/*is Single Test case?*/}cin>>t; 
   while(t--) 
   { 

      solve(); 
      cout<<"\n"; 
   } 
   
   cerr<<"time taken : "<<(float)clock()/CLOCKS_PER_SEC<<" secs"<<endl; 
   return 0; 
} 
void solve() 
{ 
      cin >> word;
      if (word.back() = 's'){
         word += "es";
      }
      else {
         word += "s";
      }
      cout << word;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:16:4: error: '$' was not declared in this scope
   16 |    ${2:/*is Single Test case?*/}cin>>t;
      |    ^
a.cc: In function 'void solve()':
a.cc:29:14: error: 'word' was not declared in this scope
   29 |       cin >> word;
      |              ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  cin>>s;
  int n = s.lenght();
  if(s[n-1] == 's')
  {
    s = s.substr(0,n-1) + "es";
  }
  else
  {
    s = s + 's';
  }
  cout<<s<<'\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
    7 |   int n = s.lenght();
      |             ^~~~~~
      |             length
Language: C

#include <bits/stdc++.h>
#define DEBUG fprintf(stderr, "Passing [%s] line %d\n", __FUNCTION__, __LINE__)
#define File(x) freopen(x".in","r",stdin); freopen(x".out","w",stdout)

using namespace std;

typedef long long LL;
typedef pair <int, int> PII;
typedef pair <int, PII> PIII;

template <typename T>
inline T gi()
{
    T f = 1, x = 0; char c = getchar();
    while (c < '0' || c > '9') {if (c == '-') f = -1; c = getchar();}
    while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
    return f * x;
}

const int INF = 0x3f3f3f3f, N = 100003, M = N << 1;

string s;

int main()
{
    //File("");
    cin >> s;
    if (s[s.size() - 1] == 's') cout << s << "es" << endl;
    else cout << s << "s" << endl;
    return 0;
}

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 <bits/stdc++.h>
using namespace std;
int number = 0;
typedef struct BSTnode{
    long long int key; int num;  struct BSTnode *lson=NULL; struct BSTnode *rson=NULL;
}BSTnode;

BSTnode* node(int data){ /* node域を確保しkeyを格納 */
    BSTnode *p;
    p = (BSTnode*)malloc(sizeof(BSTnode));
    if(p!=NULL){p->key=data; p->num = ++number;}
    return p;
}

int insert2(BSTnode **head, long long int x){
    BSTnode *v, *up, *nr;
    v = *head;
    while(v!=NULL){
        up=v;
        if(x < v->key) v = v->lson;
        else if(x > v->key) v = v->rson;
        else return 1;
    }
    nr = node(x);
    if(x < up->key) up->lson=nr;
    else up->rson=nr;
    return 0;
}

int search(BSTnode* head, long long int key){
   BSTnode *v=head;
   while(v!=NULL){
      if(v->key==key) return v->num;
      if(v->key>key) v = v->lson;
      else v = v->rson;
   }
   return 0;
}

int main() {
    long long int N, X, M, temp, ans=0;
    cin >> N >> X >> M;
    BSTnode *head = node(X);
    ans = X;
    long long int i=1;
    for(; i<=N; ++i){
       X = (X*X)%M;
       if(search(head, X)>0) break;
       insert2(&head, X);
       ans += X;
    }
    if(i==N+1){
       cout << ans <<endl;
       return 0;
    }
    long long int s = search(head, X);
    long long int cycle = s - (i-1);
    long long int Y=0;
    for(i=s; i<=cycle+s; ++i){
        = (X*X)%M;
       ans += X;
    }
    ans = ans*(N/cycle);
    i = cycle*(N/cycle);
    ++i;
    for(; i<=N; ++i){
       X = (X*X)%M;
       ans += X;
    }
    cout << ans <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:9: error: expected primary-expression before '=' token
   60 |         = (X*X)%M;
      |         ^
Language: C++

// author : ayush_nishad
// Road to Expert since : 30 Aug 2020
#include <bits/stdc++.h>
using namespace std;

#define int long long
#define pb push_back
#define in insert
#define F first
#define S second
#define mod 1000000007
#define endl '\n'
#define all(x)  x.begin(),x.end()
#define w(x) int x;cin>>x; while(x-->0)
#define memset(a,b) memset(a,b,sizeof(a))
#define debug(x) cout << "[ " << #x  << " : " << x << " ]" << endl;

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

}
/*
think fast
think simple
*/
void mysol()
{
	strin s;
	cin>>s;
	if(s.back()=='s')
		s+="es";
	else
		s+='s';
	cout<<s;
}

int32_t main()
{
    fast();
    // w(t)
    {
        mysol();
    }
    //cerr << sizeof(dp)*(1e-6) << " megabytes\n";
    return 0;
}


Compiler output:
a.cc: In function 'void mysol()':
a.cc:30:9: error: 'strin' was not declared in this scope; did you mean 'stdin'?
   30 |         strin s;
      |         ^~~~~
      |         stdin
a.cc:31:14: error: 's' was not declared in this scope
   31 |         cin>>s;
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
string solve(string s)
{
  if(s.back()=='s')
  {
    retunr s+"es";
  }
  else
  {
    return s+'s';
  }
}

int main()
{
  string s;
  cin>>s;
  
	cout<<solve(s)<<"\n";
  return 0;
}

Compiler output:
a.cc: In function 'std::string solve(std::string)':
a.cc:7:5: error: 'retunr' was not declared in this scope
    7 |     retunr s+"es";
      |     ^~~~~~
a.cc:13:1: warning: control reaches end of non-void function [-Wreturn-type]
   13 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
main()
{
  string s;
  cin>>s;
  int len=s.length();
  char ch=s.at(len);
  if(char=='s')
  {
    cout<<s<<'es';
  }
  else
  {
    cout<<s<<'s';
  }
}

Compiler output:
a.cc:11:14: warning: multi-character character constant [-Wmultichar]
   11 |     cout<<s<<'es';
      |              ^~~~
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:10: error: expected unqualified-id before '==' token
    9 |   if(char=='s')
      |          ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
 int main()
 {
   string s;
   cin>>s;
   
   if(s[s.length()-1]=='s')
   {
     s.push_back("es");
   }
   else
   {
     s.push_back('s');
   }
   
   cout<<s<<"\n";
   return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   10 |      s.push_back("es");
      |                  ^~~~
      |                  |
      |                  const char*
In file included from /usr/include/c++/14/string:54,
                 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/basic_string.h:1572:24: note:   initializing argument 1 of 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 1572 |       push_back(_CharT __c)
      |                 ~~~~~~~^~~
Language: C

#include <stdio.h>
#include <string.h>
int main(void)
{
  char s[1000];
  scanf("%s", s);
  int a = strlen(s);
  if (s(a - 1) == s)
  {
    printf("%s", s);
    printf("es\n");
  }
  else
  {
    printf("%s", s);
    printf("s\n");
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:7: error: called object 's' is not a function or function pointer
    8 |   if (s(a - 1) == s)
      |       ^
main.c:5:8: note: declared here
    5 |   char s[1000];
      |        ^
Language: C

#include <stdio.h>
#include <string.h>
int main(void)
{
  int a = strlen(s);
  char s[1000];
  scanf("%s", s);
  if (s(a - 1) == s)
  {
    printf("%s", s);
    printf("es\n");
  }
  else
  {
    printf("%s", s);
    printf("s\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:18: error: 's' undeclared (first use in this function)
    5 |   int a = strlen(s);
      |                  ^
main.c:5:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:7: error: called object 's' is not a function or function pointer
    8 |   if (s(a - 1) == s)
      |       ^
main.c:6:8: note: declared here
    6 |   char s[1000];
      |        ^
Language: Java

import java.util.Scanner;

public class Main3 {
    void run(String[] args){
        Scanner scan=new Scanner(System.in);
        long answer=scan.nextInt();
        Integer i;
        Integer j;
        Integer z;
        Integer sum;
        long count=0;
        for(i=1;i<=answer;i++){
            for(j=1;j<(answer-1)/i;j++){
                for(z=1;z<=answer;z++){
                    if(i*j+z==answer){
                        count=count+1;
                        break;
                    }
                }
            }
        }
        System.out.println(count);
    }
    
    public static void main(String args[]){
        Main3 printer = new Main3();
        printer.run(args);
    }
}


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

#include<bits/stdc++.h>
using namespac std;
int main()
{
  string s;
  cin>>s;
  if(s[s.length()-1]!='s')
  {
    cout<<s<<'s'<<endl;
  }
  else
  {
    cout<<s<<"es"<<endl;
  }
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespac'
    2 | using namespac std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s;
      |   ^~~~~~
a.cc:5:3: 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:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>s;
      |   ^~~
      |   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:6:8: error: 's' was not declared in this scope
    6 |   cin>>s;
      |        ^
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout<<s<<'s'<<endl;
      |     ^~~~
      |     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:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout<<s<<'s'<<endl;
      |                   ^~~~
      |                   std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |     cout<<s<<"es"<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |     cout<<s<<"es"<<endl;
      |                    ^~~~
      |                    std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;

int main () {
  string S;
  cin >> S;
  
  if (S.back() == "s") {
    cout << S << "es" << endl;
  }
  
  else {
    cout << S << "s" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if (S.back() == "s") {
      |       ~~~~~~~~~^~~~~~
Language: C++

#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define ll long long int
#define ff first
#define ss second
#define S size()
#define mod (ll)(1e9+7)
#define mset(a,k) memset(a,k,sizeof(a))
#define fr(i, x, y) for ( ll i = x; i < y;i++)
#define dr(i, x, y) for ( ll i = x; i >= y; i--)
#define all(v) v.begin(), v.end()
#define pqueue priority_queue<ll>
#define piqueue priority_queue<ll,vll ,greater<ll>>
#define mapcl map<char,ll>
#define mapll map<ll,ll>
#define mapsl map<string,ll>
#define vi vector<ll>
#define vs vector<string>
#define vb vector<bool>
#define psi pair<string,ll>
#define pii pair<ll,ll>
#define piii pair<ll,pii>
#define vii vector<pii>
#define vvi vector<vi>
#define vvii vector<vii>
using namespace std;
void fast() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
}
//----------------------------------------FUNCTIONS-------------------------------------
ll gcd(ll x, ll y )						{if (y == 0) return x; return gcd(y, x % y);}
ll lcm(ll a, ll b)						{return (a * b) / gcd(a, b);}
const ll MAXN = (ll)(1 * 1e6 + 5 );
void solve()
{
	string s;
	cin>>s;
	ll n = s.S;
	if(s[n-1]=='s')
	{
		cout << fr(i, 0, n - 1) cout << s[i];
		cout << "es\n";
	}
	else 
	{
		cout << s;
		cout << 's\n';
	}
	
}
int main()
{
	fast();
	ll t = 1;
	cin >> t;
	fr(i, 0, t)
    	{
		solve();
	}
}

Compiler output:
a.cc:50:25: warning: multi-character character constant [-Wmultichar]
   50 |                 cout << 's\n';
      |                         ^~~~~
a.cc: In function 'void solve()':
a.cc:10:21: error: expected primary-expression before 'for'
   10 | #define fr(i, x, y) for ( ll i = x; i < y;i++)
      |                     ^~~
a.cc:44:25: note: in expansion of macro 'fr'
   44 |                 cout << fr(i, 0, n - 1) cout << s[i];
      |                         ^~
a.cc:44:28: error: 'i' was not declared in this scope
   44 |                 cout << fr(i, 0, n - 1) cout << s[i];
      |                            ^
a.cc:10:37: note: in definition of macro 'fr'
   10 | #define fr(i, x, y) for ( ll i = x; i < y;i++)
      |                                     ^
Language: C

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

int main() {
  string s, result;
  cin >> s;

  if (s[s.length() - 1] == 's') {
    result = s + "es";
  } else {
    result = s + 's';
  }

  cout << result;
}


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++

s = input()
if s[-1] == 's':
    s += 'es'
else:
    s += 's'
print(s)


Compiler output:
a.cc:3:10: warning: multi-character character constant [-Wmultichar]
    3 |     s += 'es'
      |          ^~~~
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C++

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

typedef unsigned long long ll;
#define mod 1000000007
#define all(x) (x).begin(),(x).end()

void solve(){
	string s;
  	cin>>s;
  	char c = s[s.lenght()-1];
  	if(c == 's')
      cout<<s+"es";
  	else
      cout<<s+"s";
  	cout<<endl;
}


int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  solve();
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:11:22: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
   11 |         char c = s[s.lenght()-1];
      |                      ^~~~~~
      |                      length
Language: Java

import java.util.*;

public class test{
    
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
        
        String word;
        String neww=new String();
        word=sc.next();
        int lenth=word.length();
        if(word.charAt(lenth-1)=='s')
        {
            neww=word+"es";
        }
        else
        {
            neww=word+"s";
        }
        System.out.println(neww);
    }
}

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<bits/stc++.h>
using namespace std;
int main(){
  string s;
  cin >> s;
  if (s.back() == 's') s += "es";
  else s += "s";
  cout << s << endl;
}

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

import java.util.*;

public class test{
    
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
        
        String word;
        String neww=new String();
        word=sc.next();
        char nword[]=new char[word.length()];
        int lenth=word.length();
        if(nword[lenth-1]!='s')
        {
            neww=word+'s';
        }
        else if(nword[lenth-1]=='s')
        {
            neww=word+"es";
        }
        System.out.println(neww);
    }
}

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<bits/stdc++.h>
#include<algolithm>
#define rep(i,n) for(i=0;i<(n);i++)
using namespace std;
using ll=long long;
using P=pair<int,int>;
#define ll long long int
int main()
{
    string s;
    cin>>s;
    if(s[s.size()-1]=='s')
        cout<<s+"es"<<endl;
    else
        cout<<s+"s"<<endl;
    return 0;
}


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

/**
 *    author:  morato
 *    created: 19.09.2020 17:25:37
**/
#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin >> s;
  int n = s.size();
  if (s.back() == 's') {
    s.pop_back();
    cout << s << "es\n";
  } else {
    cout << s << 's' << '\n';
  }
  cout 
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:7: error: expected ';' before 'return'
   21 |   cout
      |       ^
      |       ;
   22 |   return 0;
      |   ~~~~~~
Language: C

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

using ll = long long;
#define REP(i, n) for(int (i)=0; (i)< (n); ++i)
#define REPR(i, n) for(int (i)=(n); (i)>=0; --i)
#define FOR(i, n, m) for(int (i)=(n); (i)<(m); ++i)
constexpr int INF = 1e9;
//constexpr ll INF = 1LL << 61;
constexpr int mod = 1e9+7;

int main(){
  string S;
  cin >> S;
  if(S.back() == 's'){
    S+="es";
  }
  else{
    S += "s";
  }
  cout << S << endl;
  return 0;
}


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<bits/stdc++.h>
using namespace std;
int main()
{
  char m[1005];
  scanf(" %[^\n]",m);
  int l;
  l=strlen(m);
  if(s[l-1]=='s')
    printf("%ses",m);
  else
    printf("%ss",m);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: 's' was not declared in this scope
    9 |   if(s[l-1]=='s')
      |      ^