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

using namespace std;

typedef   long long  int ll;
#include <bits/stdc++.h>


//setbase - cout << setbase (16); cout << 100 << endl; Prints 64
//setfill -   cout << setfill ('x') << setw (5); cout << 77 << endl; prints xxx77
//setprecision - cout << setprecision (14) << f << endl; Prints x.xxxx
//cout.precision(x)  cout<<fixed<<val;  // prints x digits after decimal in val
#define fast  ios_base::sync_with_stdio(false); cin.tie(0);  cout.tie(0);
#define all(a) a.begin(),a.end()
//#define mod 998244353


#define mod   998244353

#define inf 1e18
//#define mod 3
#define flush fflush(stdout)

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef cc_hash_table<ll, ll, hash< ll > > ht;

// find_by_order()  // order_of_key
typedef tree<
    ll,
    null_type,
    less<ll>,
    rb_tree_tag,
    tree_order_statistics_node_update>
    ordered_set;






ll power1(ll a, ll b)//a raised to power b
   {  if(b<=0) return 1; if(b==1) return a;
       ll c=power1(a,b/2);
        c*=c;c%=mod;if(b%2==1) c*=a;c%=mod;
        return c;
   }
   ll mi(ll a,ll m)
   { ll c= power1(a,m-2);

     return c;
   }



 struct less_then_greater {
    template<typename T, typename U>
    bool operator()(T const& lhs, U const& rhs) const {
        if (lhs.first < rhs.first) return true;
        if (rhs.first < lhs.first) return false;
        return lhs.second > rhs.second;
    }
};

 /*std::priority_queue<std::pair<int, int>,
                    std::vector<std::pair<int, int>>,
                    less_then_greater
                    > pq;*/


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

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:74:17: error: expected ')' before ';' token
   74 |    else (s+="es" ;cout<<s;)
      |         ~       ^~
      |                 )
a.cc:74:27: error: expected primary-expression before ')' token
   74 |    else (s+="es" ;cout<<s;)
      |                           ^
Language: Java

import java.util.io
import java.util.Scanner
import java.lang.String
public Class Main{
	public static void main(str [] args){
    Scanner sc= new Scanner(System.in);
    String str= sc.next();
    if(str.endsWith('s'))
    {
    str=str+'es';
    }
    else
    {
    str=str+'s';
    }
    System.out.println(str);
    }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util.io
                   ^
Main.java:2: error: ';' expected
import java.util.Scanner
                        ^
Main.java:3: error: ';' expected
import java.lang.String
                       ^
Main.java:4: error: class, interface, enum, or record expected
public Class Main{
       ^
Main.java:10: error: unclosed character literal
    str=str+'es';
            ^
Main.java:10: error: unclosed character literal
    str=str+'es';
               ^
Main.java:10: error: not a statement
    str=str+'es';
              ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(str [] args){
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:18: error: class, interface, enum, or record expected
}
^
9 errors
Language: C++

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

int main(){
	string S;
 	cin >> S;
  int end = S.size();
  	char find = S.at(end);
 if(find == "s"){
 	string total = "es";
 }
 else{
 	string total = "s";
 }
  cout << S << total << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |  if(find == "s"){
      |     ~~~~~^~~~~~
a.cc:15:16: error: 'total' was not declared in this scope
   15 |   cout << S << total << endl;
      |                ^~~~~
Language: C++

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

int main(){
	string S;
 	cin >> S;
  int end = S.size();
  	char find = S.at(end);
 if(find == s){
 	string find1 = es;
 }
 else{
 	string find1 = s;
 }
  cout << S << find1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 's' was not declared in this scope
    9 |  if(find == s){
      |             ^
a.cc:10:24: error: 'es' was not declared in this scope
   10 |         string find1 = es;
      |                        ^~
a.cc:15:16: error: 'find1' was not declared in this scope; did you mean 'find'?
   15 |   cout << S << find1 << endl;
      |                ^~~~~
      |                find
Language: C++

#include <stdio.h>

if std::string s = "";
else std::string t = "s";
if (s.size() >= t.size() &&
    s.compare(s.size() - t.size(), t.size(), t) == 0) {
   puts("文字列`bc`で終わる文字列です");
}

Compiler output:
a.cc:3:1: error: expected unqualified-id before 'if'
    3 | if std::string s = "";
      | ^~
a.cc:4:1: error: expected unqualified-id before 'else'
    4 | else std::string t = "s";
      | ^~~~
a.cc:5:1: error: expected unqualified-id before 'if'
    5 | if (s.size() >= t.size() &&
      | ^~
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        sc.nextLine();
        for (int i = 0; i < N; i++) {
            String word = sc.nextLine();
            int size = word.length();
            int cut_length = 2;
            String end2 = word.substring(size - cut_length);
            String end1 = end2.substring(1);

            if (end1.equals("s")) {
                word += "es";

            }else {
                word += "s";
            }
            System.out.println(word);
        }

    }

Compiler output:
Main.java:25: error: reached end of file while parsing
    }
     ^
1 error
Language: Java

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

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

import java.io.*;

 public class Main
{

	public static void main(String[] args)throws IOException
	{
		BufferedReader br=
			new BufferedReader(new InputStreamReader(System.in));

		String str1=br.readLine();
		
		if(str1.endswih("s")){
			System.out.println(str1 + "es");
		}

		else{
			System.out.println(str1 +'s');
		}
	}
}

Compiler output:
Main.java:13: error: cannot find symbol
		if(str1.endswih("s")){
		       ^
  symbol:   method endswih(String)
  location: variable str1 of type String
1 error
Language: Java

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

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

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

int main() {
 string S;
 cin >>S;

std::string str = S;
 
int s = str.find_last_of('s');

// Sの末尾の判断は？

 if(s== std::string::"s"){
 std::cout << S+",es" << endl;
}

 else if(s!="s"){
 std::cout << S+",s" << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: expected unqualified-id before string constant
   14 |  if(s== std::string::"s"){
      |                      ^~~
a.cc:14:12: error: expected ')' before string constant
   14 |  if(s== std::string::"s"){
      |    ~       ^         ~~~
      |            )
a.cc:18:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |  else if(s!="s"){
      |          ~^~~~~
Language: C++

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

int main() {
 string S;
 cin >>S;

std::string str = S;
 
int s = str.find_last_of('s');

// Sの末尾の判断は？

 if(s== std::string::"s"){
 cout << S+",es" << endl;
}

 else if(s!="s"){
 cout << S+",s" << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: expected unqualified-id before string constant
   14 |  if(s== std::string::"s"){
      |                      ^~~
a.cc:14:12: error: expected ')' before string constant
   14 |  if(s== std::string::"s"){
      |    ~       ^         ~~~
      |            )
a.cc:18:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |  else if(s!="s"){
      |          ~^~~~~
Language: C++

#include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
    char a[1000];
    gets(a);
    int b=strlen(a);
    for(int i=0;a[i]!='\0';i++){
        if(a[i]>='A' && a[i]<='Z'){
            a[i]=a[i]+32;
        }
    }
    if(a[b-1]=='s'){
        a[b]='e';
        a[b+1]='s';
        a[b+2]='\0';
    }
    else{
        a[b]='s';
        a[b+1]='\0';
    }
    cout<<a<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |     gets(a);
      |     ^~~~
      |     getw
Language: C

#include <stdio.h>
#include <string.h>

int main()
{   char me[1000];
    gets(me);
    if((z[(strlen(z)-1)])!='s')
    {
        printf("%ss", z);
    }
    else if((z[(strlen(z)-1)])=='s')
    {
        printf("%ses", z);
    }


    return 0;
}#include <stdio.h>
#include <string.h>

int main()
{   char me[10000];
   
 gets(me);
   
 if((me[(strlen(me)-1)])!='s')
    {
        printf("%ss\n", me);
    }
    else 

if((me[(strlen(me)-1)])=='s')
    {
        printf("%ses\n", me);
    }


    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    6 |     gets(me);
      |     ^~~~
      |     fgets
main.c:7:9: error: 'z' undeclared (first use in this function)
    7 |     if((z[(strlen(z)-1)])!='s')
      |         ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:18:2: error: stray '#' in program
   18 | }#include <stdio.h>
      |  ^
main.c:18:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   18 | }#include <stdio.h>
      |           ^
Language: C++

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

int main() {
 string S;
 cin >>S;

 string s=str.rfind("s");

// Sの末尾の判断は？

 if(s=="s"){
 cout << S+",es" << endl;
}

 else if(s!="s"){
 cout << S+",s" << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: 'str' was not declared in this scope; did you mean 'std'?
    8 |  string s=str.rfind("s");
      |           ^~~
      |           std
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n;
cin>>n;
int count=0;
for(int i=0;i<n;i++)
{
  for(int j=0;j<n;j++)
  {
    for(int k=0;k<n;k++)
    {
      if(i*j+k==n)
      {
        count+=1;
      }
    }
  }
  cout<<count;
}


Compiler output:
a.cc:4:1: error: 'cin' does not name a type
    4 | cin>>n;
      | ^~~
a.cc:6:1: error: expected unqualified-id before 'for'
    6 | for(int i=0;i<n;i++)
      | ^~~
a.cc:6:13: error: 'i' does not name a type
    6 | for(int i=0;i<n;i++)
      |             ^
a.cc:6:17: error: 'i' does not name a type
    6 | for(int i=0;i<n;i++)
      |                 ^
Language: C++

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

int main() {
 string S;
 cin >>S;

int s=str.rfind("s");

// Sの末尾の判断は？

 if(s=="s"){
 cout << S+",es" << endl;
}

 else if(s!="s"){
 cout << S+",s" << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'str' was not declared in this scope; did you mean 'std'?
    8 | int s=str.rfind("s");
      |       ^~~
      |       std
a.cc:12:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |  if(s=="s"){
      |     ~^~~~~
a.cc:16:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |  else if(s!="s"){
      |          ~^~~~~
Language: C++

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

int main() {
 string S;
 cin >>S;

int s=str.rfind("s")

// Sの末尾の判断は？

 if(s=="s"){
 cout << S+",es" << endl;
}

 else if(s!="s"){
 cout << S+",s" << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'str' was not declared in this scope; did you mean 'std'?
    8 | int s=str.rfind("s")
      |       ^~~
      |       std
Language: C++

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

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

Compiler output:
a.cc:14:15: warning: missing terminating ' character
   14 |  cout << s << '"s"<< endl;
      |               ^
a.cc:14:15: error: missing terminating ' character
   14 |  cout << s << '"s"<< endl;
      |               ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:15:1: error: expected primary-expression before '}' token
   15 | }
      | ^
Language: C++

#include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
    char a[1000];
    gets(a);
    int b=strlen(a);
//    for(int i=0;a[i]!='\0';i++){
//        if(a[i]>='A' && a[i]<='Z'){
//            a[i]=a[i]+32;
//        }
//    }
    if(a[b-1]=='s'){
        a[b]='e';
        a[b+1]='s';
        a[b+2]='\0';
    }
    else{
        a[b]='s';
        a[b+1]='\0';
    }
    cout<<a;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |     gets(a);
      |     ^~~~
      |     getw
Language: C++

#include<stdio.h>
#include<stdlib.h>
#include<cmath>
#include<string>

int main() 
{
	char s[10002];
	scanf("%s", s);
	int len = strlen(s);
	if (s[len - 1] == 's') {
		s[len] = 'e';
		s[len + 1] = 's';
		len += 2;
	}
	else {
		s[len++] = 's';

	}
	for (int i = 0; i < len; i++) {
		printf("%c", s[i]);
	}
	printf("\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 'strlen' was not declared in this scope
   10 |         int len = strlen(s);
      |                   ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include<string>
  +++ |+#include <cstring>
    5 |
Language: C++

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

int main() {
 string S;
 cin >>S;

// Sの末尾の判断は？

 if(=="s"){
 cout << S+",es" << endl;
}

 else if(!="s"){
 cout << S+",s" << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected primary-expression before '==' token
   10 |  if(=="s"){
      |     ^~
a.cc:14:10: error: expected primary-expression before '!=' token
   14 |  else if(!="s"){
      |          ^~
Language: C++

#include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
    char a[1000];
    gets(a);
    int b=strlen(a);
    for(int i=0;a[i]!='\0';i++){
        if(a[i]>='A' && a[i]<='Z'){
            a[i]=a[i]+32;
        }
    }
    if(a[b-1]=='s'){
        a[b]='e';
        a[b+1]='s';
        a[b+2]='\0';
    }
    else{
        a[b]='s';
        a[b+1]='\0';
    }
    cout<<a;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |     gets(a);
      |     ^~~~
      |     getw
Language: C++

//遶ｶ謚繝励Ο繧ｰ繝ｩ繝溘Φ繧ｰ逕ｨ縺ｮ繝・Φ繝励Ξ繝ｼ繝・#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <string>
#include <math.h>
#include <stack>
#include <limits>

#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define repr(i, n) for(int i = n - 1; i >= 0; i--)

using namespace std;
//繧ｨ繧､繝ｪ繧｢繧ｹ
using ll = long long int;
using p = pair<int, int>;
using pl = pair<ll, ll>;
using v = vector<int>;
using vd = vector<double>;
using vs = vector<string>;
using vl = vector<ll>;

//螳壽焚
const int intmax = numeric_limits<int>::max();
const ll llmax = numeric_limits<ll>::max();
const ll mod = 1e9 + 7;
const double pi = M_PI;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:33:3: error: 'cin' was not declared in this scope
   33 |   cin >> s;
      |   ^~~
a.cc:9:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    8 | #include <stack>
  +++ |+#include <iostream>
    9 | #include <limits>
a.cc:35:5: error: 'cout' was not declared in this scope
   35 |     cout << s + "es" << endl;
      |     ^~~~
a.cc:35:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:35:25: error: 'endl' was not declared in this scope
   35 |     cout << s + "es" << endl;
      |                         ^~~~
a.cc:9:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    8 | #include <stack>
  +++ |+#include <ostream>
    9 | #include <limits>
a.cc:37:5: error: 'cout' was not declared in this scope
   37 |     cout << s + "s" << endl;
      |     ^~~~
a.cc:37:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:37:24: error: 'endl' was not declared in this scope
   37 |     cout << s + "s" << endl;
      |                        ^~~~
a.cc:37:24: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: Java

import java.util.Scanner;

public class A {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        System.out.print(S);
        if (S.charAt(S.length()-1)=='s') {
            System.out.println("es");
        }else {
            System.out.println("s");
        }
    }
}


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

import java.io.DataInputStream;
import java.io.IOException;

public class A {
    private static String n;

    final private static int BUFFER_SIZE = 1 << 16;
    private static DataInputStream din;
    private static byte[] buffer;
    private static int bufferPointer, bytesRead;

    public static void main(String[] args) throws IOException {
        Reader reader = new Reader();
        n = reader.readLine();

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

    }

    static class Reader {

        public Reader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public String readLine() throws IOException {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null)
                return;
            din.close();
        }

    }
}

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

#include<iostream>
#include<conio.h>
using namespace std;
int main()
  {
  char s[30];
  cin>>s;
  cout>>s;
  
  getch();
  }

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

#include<iostream>
using namespace std;
int main()
{
  int n,count=0;
  cin>>n;
for(int i=1;i<n;i++)
{
  int t=n-c;
 for(int j=1;j<n;j++)
 {
   if((i*j)==t)
      count++;     
 }
  
}
  
  cout<<count;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'c' was not declared in this scope
    9 |   int t=n-c;
      |           ^
Language: C++

#include <stdio.h>
#include <string.h>


#define maxword 100

void pluralize (char word[]);


int main (void)
{ 
  char noun[max_word];   

  printf("Enter a noun in singular form: ");
  scanf("%s", noun);

  while (strcmp(noun, "done") != 0)
 {
    pluralize (noun);
    printf("The plural form is %s\n", noun);
 }

  return 0;
}

void pluralize (char word[])
{
  int length;
  char noun;
  length=1;
  length = strlen(word);

   if (word[length - 1] == 'y') 
 {   word[length - 1] = 'i';
     word[length] = 'e';
    word[length + 1] = 's';
    word[length + 2] = '\0';  
  }

 else if (word[length - 1] == 's' ||
    (word[length - 2] == 'c' && word[length - 1] == 'h') ||
    (word[length - 2] == 's' && word[length - 1] == 'h'))
  {  strcat(word, "es");
  }

  else
 {   strcat(word, "s");

    printf("New word is: ", &noun);
} 
return;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'max_word' was not declared in this scope; did you mean 'maxword'?
   12 |   char noun[max_word];
      |             ^~~~~~~~
      |             maxword
a.cc:15:15: error: 'noun' was not declared in this scope
   15 |   scanf("%s", noun);
      |               ^~~~
Language: C++

#include<bits//stdc++.h>
using namespace std;
  int main()
  {
    int n;
    int count=0;
    int f=0;
    cin>>n;
    int A[n]B[n];
    for(int i=0;i<n;i++)
        {
          cin>>A[i]>>B[I];
        }
    for(i=0;i<n;i++)
    {
      if(A[i]==b[i])
      {
        count++;
      }
    }
    if(count>3)
    {
      f=1;
    }
    else
    {
      f=0;
    }
    if(f==1)
    {
      cout<<"Yes";
    }
    else
    {
      cout<<"No";
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected initializer before 'B'
    9 |     int A[n]B[n];
      |             ^
a.cc:12:16: error: 'A' was not declared in this scope
   12 |           cin>>A[i]>>B[I];
      |                ^
a.cc:12:22: error: 'B' was not declared in this scope
   12 |           cin>>A[i]>>B[I];
      |                      ^
a.cc:12:24: error: 'I' was not declared in this scope
   12 |           cin>>A[i]>>B[I];
      |                        ^
a.cc:14:9: error: 'i' was not declared in this scope
   14 |     for(i=0;i<n;i++)
      |         ^
a.cc:16:10: error: 'A' was not declared in this scope
   16 |       if(A[i]==b[i])
      |          ^
a.cc:16:16: error: 'b' was not declared in this scope
   16 |       if(A[i]==b[i])
      |                ^
Language: C++

#include<iostream>
using namespace stdl
  int main()
{
  string a;
  cin>>a;
  int len=a.length();
  if(a[len-1]=='s')
    cout<<a<<"es"<<endl;
  	cout<<a<<'s'<<endl;
}

Compiler output:
a.cc:2:17: error: 'stdl' is not a namespace-name
    2 | using namespace stdl
      |                 ^~~~
a.cc:2:21: error: expected ';' before 'int'
    2 | using namespace stdl
      |                     ^
      |                     ;
    3 |   int main()
      |   ~~~                
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string a;
      |   ^~~~~~
a.cc:5:3: 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:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>a;
      |   ^~~
      |   std::cin
/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: 'a' was not declared in this scope
    6 |   cin>>a;
      |        ^
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout<<a<<"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:9:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout<<a<<"es"<<endl;
      |                    ^~~~
      |                    std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         cout<<a<<'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:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |         cout<<a<<'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.h>
#include<stdio.h>
using namespace std;

int main()
{
int length;

char str1[20];


cout<<"Input a word: ";

gets(str1);

length = strlen(str1);

if (str1[length-1]=='x'||'h'||'s')

strcat(str1,"es");

else if(str1[length-1]=='f')

strcat(str1, "ves");

else if(str1[length-1]=='y')

if(str1[length-2]=='a'||'e'||'i'||'o'||'u')

strcat(str1, "s");

else

strcat(str1, "ies");

else

strcat(str1, "s");

cout<<"\nIt's plural form is: "<<str1;



_getch();
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:1: error: 'gets' was not declared in this scope; did you mean 'getw'?
   15 | gets(str1);
      | ^~~~
      | getw
a.cc:45:1: error: '_getch' was not declared in this scope; did you mean 'getc'?
   45 | _getch();
      | ^~~~~~
      | getc
Language: Java

import java.util.Scanner;

public class A179 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();

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


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

#include <iostream>
using namespace std;
int main(void){
    string S;
    int a, i;
    cin >> S;
    a = S.size();
    i = a - 1;
    if (S.find(s) == i) {
        cout << S.push_back('e', 's');
    }
    else (S.find(s) == i) {
        cout << S.push_back('s');
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 's' was not declared in this scope
    9 |     if (S.find(s) == i) {
      |                ^
a.cc:10:28: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back(char, char)'
   10 |         cout << S.push_back('e', 's');
      |                 ~~~~~~~~~~~^~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1572:7: note: candidate: '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)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1572:7: note:   candidate expects 1 argument, 2 provided
Language: C++

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

int main() {
 string s;
 cin >> s;
 
 int n = s.size();
 if (s.at(n - 1) == "s") cout << s + "es" << endl;
 else cout << s + "s" << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |  if (s.at(n - 1) == "s") cout << s + "es" << endl;
      |      ~~~~~~~~~~~~^~~~~~
Language: C++

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

int main() {
 string s;
 cin >> s;
 
 int n = s.size()
 if (s.at(n - 1) == "s") cout << s + "es" << endl;
 else cout << s + "s" << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:9:2: error: expected ',' or ';' before 'if'
    9 |  if (s.at(n - 1) == "s") cout << s + "es" << endl;
      |  ^~
a.cc:10:2: error: 'else' without a previous 'if'
   10 |  else cout << s + "s" << endl;
      |  ^~~~
Language: C

#include<stdio.h>
 
int main(){
  char *S;
  scanf("%s",S);
  str1[12] = "es";
  str2[12] = "s";
  int i,len=0;
  for(i = 0;S[i]!='\0';i++){
    len++;
  }
  if(S[len-1] != 115){
    strcat(S , str1);
  }
  else{
    strcat(S , str2);
  }
  return S;
}


Compiler output:
main.c: In function 'main':
main.c:6:3: error: 'str1' undeclared (first use in this function)
    6 |   str1[12] = "es";
      |   ^~~~
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:3: error: 'str2' undeclared (first use in this function)
    7 |   str2[12] = "s";
      |   ^~~~
main.c:13:5: error: implicit declaration of function 'strcat' [-Wimplicit-function-declaration]
   13 |     strcat(S , str1);
      |     ^~~~~~
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:5: warning: incompatible implicit declaration of built-in function 'strcat' [-Wbuiltin-declaration-mismatch]
   13 |     strcat(S , str1);
      |     ^~~~~~
main.c:13:5: note: include '<string.h>' or provide a declaration of 'strcat'
main.c:16:5: warning: incompatible implicit declaration of built-in function 'strcat' [-Wbuiltin-declaration-mismatch]
   16 |     strcat(S , str2);
      |     ^~~~~~
main.c:16:5: note: include '<string.h>' or provide a declaration of 'strcat'
main.c:18:10: error: returning 'char *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
   18 |   return S;
      |          ^
Language: C++

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

int main() {
 string s;
 cin >> s;
 
 int n = s.size()
 if (s.at(n - 1) == "s") cout << s + "es";
 else cout << s + "s";
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:9:2: error: expected ',' or ';' before 'if'
    9 |  if (s.at(n - 1) == "s") cout << s + "es";
      |  ^~
a.cc:10:2: error: 'else' without a previous 'if'
   10 |  else cout << s + "s";
      |  ^~~~
Language: C++

#pragma GCC optimize("Ofast","inline","-ffast-math")
#pragma GCC target("avx,sse2,sse3,sse4,mmx")
#include<bits/stdc++.h>
#define int long long
#define pb push_back
#define pf push_front
#define NMSL cout << "NMSL" << endl;
#define debug(x) cout << #x << ": " << x << endl;
#define debug2(x, y) cout <<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl;
#define debug3(x, y, z) cout <<#x<<": "<<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl;
#define debug4(a, b, c, d) cout <<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl;
#define fio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define in128 __int128_t
using namespace std;
const int N = 2e5+10;
const int INF = 0x7f7f7f7f;
const double EPS = 1e-3;
const long double PI = 3.14159265358979323846;
signed main()
{
    fio
    string ss;
    cin>>ss;
    int len=ss.length();
    if(ss[len-1]=='s')ss+="es";
    else ss+='s';
    cout<<ss;
    return 0;
}


Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:3:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = char]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:186:14: note: called from here
  186 |       struct _Alloc_hider : allocator_type // TODO check __is_final
      |              ^~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
int main(void){
  string s;
  cin >> s;
  if(s.at(5) != 's'){
       s.push_back('s');
  }
  else{
      s.push_back("es");
  }
  cout << s << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   12 |       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>
 
int main(){
  char *S;
  scanf("%s",S);
  int i,len=0;
  for(i = 0;S[i]!='\0';i++){
    len++;
  }
  if(S[len-1] != 115){
    S[len] = {'e'};
    S[len+1] = {'s'};
  }
  else{
    S[len] = {'s'};
  }
  return S;
}


Compiler output:
main.c: In function 'main':
main.c:11:14: error: expected expression before '{' token
   11 |     S[len] = {'e'};
      |              ^
main.c:12:16: error: expected expression before '{' token
   12 |     S[len+1] = {'s'};
      |                ^
main.c:15:14: error: expected expression before '{' token
   15 |     S[len] = {'s'};
      |              ^
main.c:17:10: error: returning 'char *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
   17 |   return S;
      |          ^
Language: C

#include<stdio.h>
 
int main(){
  char *S;
  scanf("%s",S);
  int i,len=0;
  for(i = 0;S[i]!=\0;i++){
    len++;
  }
  if(S[len-1] != 115){
    S[len] = {'e'};
    S[len+1] = {'s'};
  }
  else{
    S[len] = {'s'};
  }
  return S;
}

Compiler output:
main.c: In function 'main':
main.c:7:19: error: stray '\' in program
    7 |   for(i = 0;S[i]!=\0;i++){
      |                   ^
main.c:11:14: error: expected expression before '{' token
   11 |     S[len] = {'e'};
      |              ^
main.c:12:16: error: expected expression before '{' token
   12 |     S[len+1] = {'s'};
      |                ^
main.c:15:14: error: expected expression before '{' token
   15 |     S[len] = {'s'};
      |              ^
main.c:17:10: error: returning 'char *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
   17 |   return S;
      |          ^
Language: C++

#include<iostream>
#include<string.h>

using namespace std;

int main()
{
	char s[1000];
  	int l = 0;
    int i = 0;
	while(s[i] != '\0')
    {
      cin>>s[i];
      i++;
    }
  	int l = i-1;
	if (s[l] == 's')
    {
      i = 0;
      while(s[i] != '\0')
      {
        cout<<s[i];
      }
      cout<<"es";
    }
  	else
    {
      i = 0;
      while(s[i] != '\0')
      {
        cout<<s[i];
      }
      cout<<"s";
    }
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: redeclaration of 'int l'
   16 |         int l = i-1;
      |             ^
a.cc:9:13: note: 'int l' previously declared here
    9 |         int l = 0;
      |             ^
Language: C++

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

int main() {
  string S;
  cin >> S;
  if(S.end==s){
    S.end+"es";
  }
  else{
    S.end+"s";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 's' was not declared in this scope
    8 |   if(S.end==s){
      |             ^
a.cc:9:10: error: invalid operands of types '<unresolved overloaded function type>' and 'const char [3]' to binary 'operator+'
    9 |     S.end+"es";
      |     ~~~~~^~~~~
      |       |   |
      |       |   const char [3]
      |       <unresolved overloaded function type>
a.cc:12:10: error: invalid operands of types '<unresolved overloaded function type>' and 'const char [2]' to binary 'operator+'
   12 |     S.end+"s";
      |     ~~~~~^~~~
      |       |   |
      |       |   const char [2]
      |       <unresolved overloaded function type>
Language: C++

#include <iostream>
using namespace std;
int main(void){
    string S, A;
    int a, i;
    cin >> S;
    a = S.size();
    i = a - 1;
    if (S.find(s) == i) {
        cout << S.push_back('e', 's');
    }
    else (S.find(s) == i) {
        cout << S.push_back('s');
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 's' was not declared in this scope
    9 |     if (S.find(s) == i) {
      |                ^
a.cc:10:28: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back(char, char)'
   10 |         cout << S.push_back('e', 's');
      |                 ~~~~~~~~~~~^~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1572:7: note: candidate: '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)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1572:7: note:   candidate expects 1 argument, 2 provided
Language: C

#include<stdio.h>

int main(){
  int i,len=0;
  for(i = 0;S[i]!=\0;i++){
    len++;
  }
  if(S[len-1] != 115){
    S[len] = {'e'};
    S[len+1] = {'s'};
  }
  else{
    S[len] = {'s'};
  }
  return S;
}

Compiler output:
main.c: In function 'main':
main.c:5:13: error: 'S' undeclared (first use in this function)
    5 |   for(i = 0;S[i]!=\0;i++){
      |             ^
main.c:5:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: stray '\' in program
    5 |   for(i = 0;S[i]!=\0;i++){
      |                   ^
main.c:9:14: error: expected expression before '{' token
    9 |     S[len] = {'e'};
      |              ^
main.c:10:16: error: expected expression before '{' token
   10 |     S[len+1] = {'s'};
      |                ^
main.c:13:14: error: expected expression before '{' token
   13 |     S[len] = {'s'};
      |              ^
Language: Java

import java.util.Scanner;

public class Mamin {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
         String S = sc.nextLine();
         String x = "";

        if(charAt(S.length()-1 != "s")){
            String x = S.append("s");
        }else{
             String x = S.append("es");
        }
        System.out.print(x);
    }
}



Compiler output:
Main.java:3: error: class Mamin is public, should be declared in a file named Mamin.java
public class Mamin {
       ^
Main.java:11: error: bad operand types for binary operator '!='
        if(charAt(S.length()-1 != "s")){
                               ^
  first type:  int
  second type: String
Main.java:12: error: variable x is already defined in method main(String[])
            String x = S.append("s");
                   ^
Main.java:12: error: cannot find symbol
            String x = S.append("s");
                        ^
  symbol:   method append(String)
  location: variable S of type String
Main.java:14: error: variable x is already defined in method main(String[])
             String x = S.append("es");
                    ^
Main.java:14: error: cannot find symbol
             String x = S.append("es");
                         ^
  symbol:   method append(String)
  location: variable S of type String
6 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pi;
typedef complex <double> cp;
#define debug(a) cout<<#a<<":"<<a<<endl;
#define fr freopen("in.txt","r",stdin);
#define Fill(x,a) memset(x,a,sizeof(x))
#define cpy(a,b) memcpy(a,b,sizeof(a))
const double PI = acos(-1);
const int INF=0x3f3f3f3f;
const int N=1e6+7;
const int mod=1e9+7;
int maxn,minn;
int T,n,m,q;
string s;

int main(){
	cin >> s；
    int len = s.size();
  if(s[len - 1] == 's'){
  	s+="es";
  }
  else{
  	s+='s';
  }
  cout << s << endl;

	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: 's\U0000ff1b' was not declared in this scope
   19 |         cin >> s；
      |                ^~~
a.cc:21:8: error: 'len' was not declared in this scope
   21 |   if(s[len - 1] == 's'){
      |        ^~~
Language: C++

#include<iostream>
using namespace std;
#include<string>
 
int main()
{
  string S;
  cin>>S;
  int l = S.length();
  if(S[l-1]!='s')
  {
    cout<<S<<"s";
  }
  else
    cout<<S<<"es";

Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: expected '}' at end of input
   15 |     cout<<S<<"es";
      |                   ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include<iostream>
#include<string.h>

using namespace std;

int main()
{
	char s[1000];
  	int l = 0;
	for (int i = 0; s[i] != '\0'; i++)
    {
      cin>>s[i];
      l = i-1;
    }
	if (s[l] == 's')
    {
      int i = 0;
      while(s[i] != '\0')
      {
        cout<<s[i];
      }
      cout<<"es"
    }
  	else
    {
      int i = 0;
      while(s[i] != '\0')
      {
        cout<<s[i];
      }
      cout<<"s";
    }
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: expected ';' before '}' token
   22 |       cout<<"es"
      |                 ^
      |                 ;
   23 |     }
      |     ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string ns;
  getline(cin,ns);
  int l=ns.lenght();
  char p= ns.at(l-1);
  if(p=='s')
  {
    ns=ns+"es";
    cout<< ns<< endl;
  }
  else if(p!='s')
  {
    ns=ns+'s';
    cout<< ns<< endl;
  }
}


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

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

int main() {
    string a, b;
    cin >> a;
    int l = a.size() - 1;
    if (S.substr(l) == "s") b = "es";
    else b = "s";
    string c = a + b;
    cout << c << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'S' was not declared in this scope
    9 |     if (S.substr(l) == "s") b = "es";
      |         ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
    int unused __attribute__((unused));
    char name[1000];
    unused = scanf("%s", name)
    int length = strlen(name) - 1;
    char l = name[length];
    if(l != 's'){
        name[length + 1] = 's';
        name[length + 2] = '\0';
    }
    else if(l == 's'){
        name[length] = 'e';
        name[length + 1] = 's';
        name[length + 2] = '\0';
    }
    printf("%s", name);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:31: error: expected ';' before 'int'
    6 |     unused = scanf("%s", name)
      |                               ^
      |                               ;
    7 |     int length = strlen(name) - 1;
      |     ~~~                        
main.c:8:19: error: 'length' undeclared (first use in this function)
    8 |     char l = name[length];
      |                   ^~~~~~
main.c:8:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main()
{
  string S;
  cin>>S;
  l = S.length();
  if(S[l-1]!='s')
  {
    cout<<S<<"s";
  }
  else
    cout<<S<<"es";
return 0;
}

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: C

#include <stdio.h>
#include<string.h>

int main(void) {
  char a[1001];
  scanf("%s",a);
  
  

  if(a[b-1]=='s')
  {printf("%s\n",strcat(a,"es"));}
  else
  {
    printf("%s\n",strcat(a,"s"));
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:8: error: 'b' undeclared (first use in this function)
   10 |   if(a[b-1]=='s')
      |        ^
main.c:10:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include<string.h>

int main(void) {
  char a[1001];
  scanf("%s",a);
  
  printf("%d",b);

  if(a[b-1]=='s')
  {printf("%s\n",strcat(a,"es"));}
  else
  {
    printf("%s\n",strcat(a,"s"));
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:15: error: 'b' undeclared (first use in this function)
    8 |   printf("%d",b);
      |               ^
main.c:8:15: 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()
{
  string ns;
  getline(cin,ns);
  int l=ns.lenght();
  char p= ns.at(l-1);
  if(p=='s')
  {
    ns=ns+"es";
    cout<< ns<< endl;
  }
  else if(p!='s')
  {
    ns=ns+'s';
    cout<< ns<< endl;
  }
}
  

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

public class Main {
    public static void main(String s[]) {
        Scanner sc = new Scanner(System.in);
        String str = "";
        if (sc.hasNextLine())
            str = sc.nextLine();
        if (str.charAt(str.length() - 1) == 's')
            str += "es";
        else
            str += 's';
        System.out.println(str);
    }
}

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