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

#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<array>
#include<vector>
#include<functional>
#include<unordered_map>
#include<map>
#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>
 
using namespace std;
 
int main(){
 
  char a[100];
  int len;
  
  cin >> a;
  
  len = strlen(a);
  
  cout << a[0] << len - 2 << a[len - 1] << endl;
  
  return 0;}

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

#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<array>
#include<vector>
#include<functional>
#include<unordered_map>
#include<map>
#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>
 
using namespace std;
 
int main(){
 
  char a[100];
  int len;
  
  cin >> a;
  
  len = length(a);
  
  cout << a[0] << len - 2 << a[len - 1] << endl;
  
  return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'length' was not declared in this scope
   25 |   len = length(a);
      |         ^~~~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <algorithm>

using namespace std;
int main() {



	string s;

	cin >> s;

	string c = s.size;

	int count = stoi(c);

	cout << s[0] << count - 2 << s[count - 1];

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: invalid use of non-static member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
   16 |         string c = s.size;
      |                    ~~^~~~
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:1076:7: note: declared here
 1076 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<array>
#include<vector>
#include<functional>
#include<unordered_map>
#include<map>
#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>
 
using namespace std;
 
int main(){
 
  char a[100];
  int len;
  
  cin >> a[100];
  
  len = lenght(a);
  
  cout << a[0] << len - 2 << a[len - 1] << endl;
  
  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'lenght' was not declared in this scope
   25 |   len = lenght(a);
      |         ^~~~~~
a.cc:29:12: error: expected '}' at end of input
   29 |   return 0;
      |            ^
a.cc:18:11: note: to match this '{'
   18 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<array>
#include<vector>
#include<functional>
#include<unordered_map>
#include<map>
#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>
 
using namespace std;
 
int main(){
 
  char a[100];
  int len;
  
  cin >> a[100];
  
  len = length(a);
  
  cout << a[0] << len - 2 << a[len - 1] << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'length' was not declared in this scope
   25 |   len = length(a);
      |         ^~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<array>
#include<vector>
#include<functional>
#include<unordered_map>
#include<map>
#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>
 
using namespace std;
 
int main(){

  char a[100];
  
  cin >> a[100];
  
  cout << a[0] << length(a) -1 << a[length(a) -1] << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:19: error: 'length' was not declared in this scope
   24 |   cout << a[0] << length(a) -1 << a[length(a) -1] << endl;
      |                   ^~~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {
  char *s;
  cin >> s;
  int len = strlen(s);
  printf("%c%d%c\n", s[0], len - 2, s[len-1]);
  return 0;
}


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

import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.println(s.substring(0,1) + s.length()-2 + s.substring(s.length()-1));
	}
}

Compiler output:
Main.java:7: error: bad operand types for binary operator '-'
		System.out.println(s.substring(0,1) + s.length()-2 + s.substring(s.length()-1));
		                                                ^
  first type:  String
  second type: int
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.println(s.substring(0,1) + s.length()-2 + s.substring(s.length()-1););
	}
}

Compiler output:
Main.java:7: error: ')' or ',' expected
		System.out.println(s.substring(0,1) + s.length()-2 + s.substring(s.length()-1););
		                                                                              ^
Main.java:7: error: illegal start of expression
		System.out.println(s.substring(0,1) + s.length()-2 + s.substring(s.length()-1););
		                                                                               ^
2 errors
Language: Java

#include<iostream>
using namespace std;
int main()
{
    string s;
    cin>>s;

    int count = 0;



    for (int i = 2; i < s.length(); i++)
    {
        count++;
    }
    cout<<s[0]<<count<< s[s.length()-1];

}



Compiler output:
Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include<iostream>
        ^
Main.java:6: error: not a statement
    cin>>s;
       ^
Main.java:16: error: not a statement
    cout<<s[0]<<count<< s[s.length()-1];
                     ^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
int main()
^
  (use --enable-preview to enable unnamed classes)
5 errors
Language: Java

package l.i18n;

import java.util.Scanner;

public class LI18n {

    public static void main(String[] args) {
        int count = 0;

        Scanner s = new Scanner(System.in);
        String a = s.next();
        char r = a.charAt(0);
        char r2 = a.charAt(a.length() - 1);

        for (int i = 2; i < a.length(); i++) {
            count++;
        }
        System.out.println(r+""+count+""+r2);

    }

}


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

package l.i18n;

import java.util.Scanner;

public class LI18n.java {

    public static void main(String[] args) {
        int count = 0;

        Scanner s = new Scanner(System.in);
        String a = s.next();
        char r = a.charAt(0);
        char r2 = a.charAt(a.length() - 1);

        for (int i = 2; i < a.length(); i++) {
            count++;
        }
        System.out.println(r+""+count+""+r2);

    }

}


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

package l.i18n.java;

import java.util.Scanner;

public class LI18n {

    public static void main(String[] args) {
        int count = 0;

        Scanner s = new Scanner(System.in);
        String a = s.next();
        char r = a.charAt(0);
        char r2 = a.charAt(a.length() - 1);

        for (int i = 2; i < a.length(); i++) {
            count++;
        }
        System.out.println(r+""+count+""+r2);

    }

}


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

package l.i18n;

import java.util.Scanner;

public class LI18n {

    public static void main(String[] args) {
        int count = 0;

        Scanner s = new Scanner(System.in);
        String a = s.next();
        char r = a.charAt(0);
        char r2 = a.charAt(a.length() - 1);

        for (int i = 2; i < a.length(); i++) {
            count++;
        }
        System.out.println(r + "" + count + "" + r2);

    }

}


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



import java.util.Scanner;

public class LI18n {

    public static void main(String[] args) {
        int count = 0;

        Scanner s = new Scanner(System.in);
        String a = s.next();
        char r = a.charAt(0);
        char r2 = a.charAt(a.length() - 1);

        for (int i = 2; i < a.length(); i++) {
            count++;
        }
        System.out.println(r + "" + count + "" + r2);

    }

}


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

#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
int i,x=0;
char ch[100],ln;
gets(ch);
ln=strlen(ch);
for(i=0;i<ln;i++)
{
if(ch[i+1]>='a'&&ch[i]<='z')
 {
    x++;
 }
}
printf("%c%d%c",ch[0],x-1,ch[ln-1]);
}

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

  public static void main(String[] args) {
        int count=0;
        
        Scanner s=new Scanner(System.in);
        String a=s.next();
        
        
        
//        System.out.println(a);
        
//        for(int i=2;i<=a.length()-1;i++){
//            
//        }
        
        for(int i=2;i<a.length();i++){
            count++;
        }
        System.out.println(count);
        
    }

}


Compiler output:
Main.java:1: 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)
Main.java:22: error: class, interface, enum, or record expected
}
^
2 errors
Language: C++

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

int main()
{
    char ch[100],str1,str2;
    gets(ch);

    int n=strlen(ch),i,c=0;
    str1=ch[0];
    str2=ch[n-1];
    for(i=0; i<n; i++)
    {
        c++;
    }
    printf("%c%d%c\n",str1,(c-2),str2);

}



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

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char s[100];
    gets(s);
    int l=strlen(s);
    int i;
    char a=s[l-1];
    if(l>=3 && l<=100)
    {
        for(i=1; i<l-2; i++)
        {

        }

        cout<<s[0];
        cout<<i;
        cout<<a;

    }
    else
    {
        cout<<s;
    }
    return 0;
}


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

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

int main()
{
    char str[100];
    int i,len,num=0;
    gets(str);
    len=strlen(str);
    for(i=0;i<len;i++)
    {
        if(len<3)
            break;
        else if(i>0&&i<len-1)
        {
            num++;
        }
    }
    if(len>2)
        printf("%c%d%c\n",str[0],num,str[len-1]);
    return 0;
}


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

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

int main()
{
    char str[100];
    int i,len,num=0;
    gets(str);
    len=strlen(str);
    for(i=0;i<len;i++)
    {
        if(len<3)
            break;
        else if(i>0&&i<len-1)
        {
            num++;
        }
    }
    if(len>2)
        printf("%c%d%c\n",str[0],num,str[len-1]);
    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(str);
      |     ^~~~
      |     getw
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char a[100];
    gets(a);
    int l=strlen(a);
    if(l>=3)
    {
        int k=l-2;
        printf("%c%d%c\n",a[0],k,a[l-1]);
    }
    return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char a[100];
    while(gets(a))
    {
        int l=strlen(a);
        if(l>=3)
        {
            int k=l-2;
            printf("%c%d%c\n",a[0],k,a[l-1]);
        }
    }
    return 0;
}


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

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

int main()
{
  string str;
  //int len;
  cin >> str;
  
  //len=str.size();

  cout << str[0] << str.size() << str[str.size-1] << endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:43: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   12 |   cout << str[0] << str.size() << str[str.size-1] << endl;
      |                                       ~~~~^~~~
      |                                               ()
Language: C++

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

int main()
{
  string str;
  int len;
  cin >> str;
  
  len=str.size();

  cout << str[0] << str.size() << str[len-1] endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:45: error: expected ';' before 'endl'
   12 |   cout << str[0] << str.size() << str[len-1] endl;
      |                                             ^~~~~
      |                                             ;
Language: C++

#include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<functional>
#include<algorithm>
#include<cstdio>
#include<unordered_map>
using namespace std;
//---------------------------------------------------
//ライブラリゾーン！！！！
#define int long long
#define str string
#define rep(i,j) for(int i=0;i<(int)(j);i++)
typedef long long ll;
typedef long double ld;
const ll inf = 4523372036854775807;
const ld pi = 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989;
struct P {
	ll pos, cost;
};
bool operator<(P a, P b) { return a.cost < b.cost; }
bool operator>(P a, P b) { return a.cost > b.cost; }
struct B {//隣接リスト表現
	ll to, cost;
};
struct S {//辺の情報を入れる変数
	int from, to, cost;
};
ll gcm(ll i, ll j) {//最大公約数
	if (i > j) swap(i, j);
	if (i == 0) return j;
	return gcm(j%i, i);
}
ld radian(ld a, ld b, ld c, ld d) {
	return sqrt(pow(a - c, 2) + pow(b - d, 2));
}
//---------------------------------------------------
//+++++++++++++++++++++++++++++++++++++++++++++++++++
signed main() {
	string s;
	cin >> s;
	cout << s[0] << s.size() - 2 << s[n - 1] << endl;
	getchar(); getchar();
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:43: error: 'n' was not declared in this scope
   48 |         cout << s[0] << s.size() - 2 << s[n - 1] << endl;
      |                                           ^
Language: C++

#include <iostream>
using namespace std;

int main(){
string str;
cin >>str;
cout << str(0)<<str.length()<<str(str.length());

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)'
    7 | cout << str(0)<<str.length()<<str(str.length());
      |         ~~~^~~
a.cc:7:34: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (std::__cxx11::basic_string<char>::size_type)'
    7 | cout << str(0)<<str.length()<<str(str.length());
      |                               ~~~^~~~~~~~~~~~~~
Language: C++

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

int main(){
  char s[101];
  string a;
  int len;
  cin >> a;
  strcpy(s,a);
  len=strlen(s);
  cout << s[0] << (len-2) << s[len];
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   10 |   strcpy(s,a);
      |            ^
      |            |
      |            std::string {aka std::__cxx11::basic_string<char>}
In file included from a.cc:2:
/usr/include/string.h:141:70: note:   initializing argument 2 of 'char* strcpy(char*, const char*)'
  141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
      |                                               ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
Language: C++

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

int main(){
  char s[101];
  string a
  int len;
  cin >> a;
  strcpy(s,a);
  len=strlen(s);
  cout << s[0] << (len-2) << s[len];
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected initializer before 'int'
    8 |   int len;
      |   ^~~
a.cc:9:10: error: 'a' was not declared in this scope
    9 |   cin >> a;
      |          ^
a.cc:11:3: error: 'len' was not declared in this scope; did you mean 'mblen'?
   11 |   len=strlen(s);
      |   ^~~
      |   mblen
Language: C++

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

int main(){
  string s;
  int len;
  cin >> s;
  len=strlen(s);
  cout << s[0] << (len-2) << s[len];
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    9 |   len=strlen(s);
      |              ^
      |              |
      |              std::string {aka std::__cxx11::basic_string<char>}
In file included from a.cc:2:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C


#include<cstdio>
#include<cstring>


char a[1001];
int main()
{
 gets(a);
 int str=strlen(a);
 printf("%c%d%c",a[0],str-2,a[str-1]);
	return 0;
 }


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

#include <iostream>
#include <string>
using namespace std;
int main()
{
	string s;
  	cin >> s;
  	cout << s[0] << s.length - 2 << s[s.length - 1];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: invalid use of 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]' (did you forget the '()' ?)
    8 |         cout << s[0] << s.length - 2 << s[s.length - 1];
      |                         ~~^~~~~~
      |                                 ()
a.cc:8:45: error: invalid use of 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]' (did you forget the '()' ?)
    8 |         cout << s[0] << s.length - 2 << s[s.length - 1];
      |                                           ~~^~~~~~
      |                                                   ()
Language: C++

    #include<iostream>
    #include<string>
    using namespace std;
    int main(){
    std::string a;
    int s,s2;
    char st,en;
    cin>>a;
    a.c_str();
    s=a,size();
    s2=s-2;
    st=a[0];
    en=a[s-1];
    cout<<st<<s2<<en<<endl;
    return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: warning: ignoring return value of 'const _CharT* std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::c_str() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
    9 |     a.c_str();
      |     ~~~~~~~^~
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:2640:7: note: declared here
 2640 |       c_str() const _GLIBCXX_NOEXCEPT
      |       ^~~~~
a.cc:10:7: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in assignment
   10 |     s=a,size();
      |       ^
      |       |
      |       std::string {aka std::__cxx11::basic_string<char>}
a.cc:10:13: error: no matching function for call to 'size()'
   10 |     s=a,size();
      |         ~~~~^~
In file included from /usr/include/c++/14/string:53:
/usr/include/c++/14/bits/range_access.h:262:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:272:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note:   candidate expects 1 argument, 0 provided
Language: C++

#include<iostream>
#include<string>
using namespace
int main(){
std::string a;
int s,s2;
char st,en;
cin>>a;
a.c_str();
s=a,size();
s2=s-2;
st=a[0];
en=a[s-1];
cout<<st<<s2<<en<<endl;
return 0;
}

Compiler output:
a.cc:4:1: error: expected identifier before 'int'
    4 | int main(){
      | ^~~
a.cc:3:16: error: expected ';' before 'int'
    3 | using namespace
      |                ^
      |                ;
    4 | int main(){
      | ~~~             
a.cc: In function 'int main()':
a.cc:8:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 | cin>>a;
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:8: warning: ignoring return value of 'const _CharT* std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::c_str() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
    9 | a.c_str();
      | ~~~~~~~^~
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:
/usr/include/c++/14/bits/basic_string.h:2640:7: note: declared here
 2640 |       c_str() const _GLIBCXX_NOEXCEPT
      |       ^~~~~
a.cc:10:3: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in assignment
   10 | s=a,size();
      |   ^
      |   |
      |   std::string {aka std::__cxx11::basic_string<char>}
a.cc:10:5: error: 'size' was not declared in this scope; did you mean 'std::size'?
   10 | s=a,size();
      |     ^~~~
      |     std::size
In file included from /usr/include/c++/14/string:53:
/usr/include/c++/14/bits/range_access.h:272:5: note: 'std::size' declared here
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
a.cc:14:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 | cout<<st<<s2<<en<<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:14:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 | cout<<st<<s2<<en<<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<cstring>
#include<string>
using namespace std;

int main()
{
    string s;
    while(cin>>s)
    {
        int m=s.length();
        cout<<s[0]<<m-2<<s[m-1]<<endl;
    }

    return 0;
}


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

#include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;

int main()
{
    char str[110];
    int y;
    gets(str);
    strlwr(str);
    y= strlen(str);
    printf("%c%d%c\n",str[0],y-2,str[y-1]);

    return 0;
}



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

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


int main(void)
{
    char str[110];
    int y;
    gets(str);
    strlwr(str);
    y= strlen(str);
    printf("%c%d%c\n",str[0],y-2,str[y-1]);

    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:9:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    9 |     gets(str);
      |     ^~~~
      |     fgets
main.c:10:5: error: implicit declaration of function 'strlwr'; did you mean 'strlen'? [-Wimplicit-function-declaration]
   10 |     strlwr(str);
      |     ^~~~~~
      |     strlen
Language: C++

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


int main(void)
{
    char str[110];
    int y;
    gets(str);
    strlwr(str);
    y= strlen(str);
    printf("%c%d%c\n",str[0],y-2,str[y-1]);

    return 0;
}



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

#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
int INF = 1e9;
int MOD = 1e9+7;
main(){
    string s;
    cin >> s;
    cout << s.begin() + << s.length()-2 << s.end() << endl; 
}

Compiler output:
a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:25: error: expected primary-expression before '<<' token
    9 |     cout << s.begin() + << s.length()-2 << s.end() << endl;
      |                         ^~
Language: C

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

int main()
{
    char s[100];
    cin >> s;
    
    int mozisu = strlen(s);

    cout << s[0] << (mozisu - 2) << s[mozisu - 1] << endl;

    return 0;
}

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

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

int main()
{
    char s[100];
    cin >> s;
    
    int mozisu = strlen(s);

    cout << s[0] << (mozisu - 2) << s[mozisu - 1] << endl;

    return 0;
}

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

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

int main() {
	char s[101];
	cin>>s;
	int l=strlen(s);
	cout<<s[0]<<l-2<<s[n-1];
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: 'n' was not declared in this scope
    8 |         cout<<s[0]<<l-2<<s[n-1];
      |                            ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	char s[101];
	cin>>s;
	int l=strlen(s);
	cout<<s[0]<<l-2<<s[n-1];
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'strlen' was not declared in this scope
    7 |         int l=strlen(s);
      |               ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
a.cc:8:28: error: 'n' was not declared in this scope
    8 |         cout<<s[0]<<l-2<<s[n-1];
      |                            ^
Language: C++

#include <iostream>

using namespace std;

int main(){

string s;
cin >> s;
int N = s.length();

cout << s[0] << N-2 << s[N-1]<<endl;

return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: expected ';' before '}' token
   13 | return 0
      |         ^
      |         ;
   14 | }
      | ~
Language: C

char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}

Compiler output:
main.c:1:13: error: return type defaults to 'int' [-Wimplicit-int]
    1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
      |             ^~~~
main.c: In function 'main':
main.c:1:13: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:21: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
    1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
      |                     ^~~~
main.c:1:29: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
      |                             ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
main.c:1:29: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
      |                             ^~~~~~
main.c:1:29: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:48: error: 'n' undeclared (first use in this function)
    1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
      |                                                ^
main.c:1:48: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:56: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
      |                                                        ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen'
  +++ |+#include <string.h>
    1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
main.c:1:56: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
      |                                                        ^~~~~~
main.c:1:56: note: include '<string.h>' or provide a declaration of 'strlen'
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <array>
#include <vector>
#include <functional>
#include <unordered_map> 
#include <map> 
#include <numeric>
#include <limits>
#include <utility>
#include <queue>
#include <atltime.h>
#include <random>
using namespace std;
typedef long long LL;

int main(void) {
	string a;
	cin >> a;
	cout << a[0] << a.size() - 2 << a[a.size() - 1] << endl;
	return 0;
}

Compiler output:
a.cc:14:10: fatal error: atltime.h: No such file or directory
   14 | #include <atltime.h>
      |          ^~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String [] args){
Scanner in=new Scanner (System.in);
String a=in.next();
int N=a.length();
System.out.println("'+a.charAt(0)+(N-2)+a.charAt(N-1));
}
}

Compiler output:
Main.java:7: error: unclosed string literal
System.out.println("'+a.charAt(0)+(N-2)+a.charAt(N-1));
                   ^
1 error
Language: C++

import java.util.Scanner;
public class Main{
public static void main(String [] args){
Scanner in=new Scanner (System.in);
String a=in.next();
int N=a.length();
System.out.println("'+a.charAt(0)+(N-2)+a.charAt(N-1));
}
}

Compiler output:
a.cc:7:20: warning: missing terminating " character
    7 | System.out.println("'+a.charAt(0)+(N-2)+a.charAt(N-1));
      |                    ^
a.cc:7:20: error: missing terminating " character
    7 | System.out.println("'+a.charAt(0)+(N-2)+a.charAt(N-1));
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Main{
      | ^~~~~~
Language: C++

#include<iostream>
#include<math.h>
#include<cctype>
#include<cerrno>
#include<cfloat>
#include<ciso646>
#include<climits>
#include<clocale>
#include<cmath>
#include<csetjmp>
#include<csignal>
#include<cstdarg>
#include<cstddef>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<string>
#include<string.h>
#include<map>
#include<vector>
#include<set>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main()
{
	char s[200];
	gets(s);
	cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
	return 0;
}

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

#include<bits\stdc++.h>
using namespace std;
int main()
{
	char s[200];
	gets(s);
	cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
	return 0;
}

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

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

int main(){
  string s;
  int n;
  cin >> s;
  int n = s.length();
  cout << s[0] << n -2 << s[n - 1] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: redeclaration of 'int n'
    8 |   int n = s.length();
      |       ^
a.cc:6:7: note: 'int n' previously declared here
    6 |   int n;
      |       ^
Language: C++

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

int main(){
	sting s;
	cin>>s;
	cout<<s[0]<<s.size()-2<<s[s.size()-1]<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'sting' was not declared in this scope
    5 |         sting s;
      |         ^~~~~
a.cc:6:14: error: 's' was not declared in this scope
    6 |         cin>>s;
      |              ^
Language: C++

#include<iostream>
#include<string>
int main(){
  std::string s; cin >> s;
  std::cout<<s[0]<<s.size()-2<<s[s.size()-1]<<'\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:18: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   std::string s; cin >> s;
      |                  ^~~
      |                  std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include<iostream>
#include<string>
int main(){
  string s; cin >> s;
  std::cout<<s[0]<<s.size()-2<<s[s.size()-1]<<'\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string s; cin >> s;
      |   ^~~~~~
a.cc:4: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:4:13: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   string s; cin >> s;
      |             ^~~
      |             std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:20: error: 's' was not declared in this scope
    4 |   string s; cin >> s;
      |                    ^
Language: C++

#include<iostream>
#include<string>
main(){
  string s;cin>>s;
  std::cout<<s[0]<<s.size()-2<<s[s.size()-1]<<'\n';
}


Compiler output:
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:4:3: error: 'string' was not declared in this scope
    4 |   string s;cin>>s;
      |   ^~~~~~
a.cc:4: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:4:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   string s;cin>>s;
      |            ^~~
      |            std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:17: error: 's' was not declared in this scope
    4 |   string s;cin>>s;
      |                 ^
Language: C++

#include<bits/stdc++.h>
main(){
  string s;cin>>s;
  std::cout<<s[0]<<s.size()-2<<s[s.size()-1]<<'\n';
}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string s;cin>>s;
      |   ^~~~~~
a.cc:3: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:3:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    3 |   string s;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:3:17: error: 's' was not declared in this scope
    3 |   string s;cin>>s;
      |                 ^
Language: C++

#include<bits/stdc++.h>
main(){
  string s;cin>>s;
  cout<<s[0]<<s.size()-2<<s[s.size()-1]<<endl;
}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string s;cin>>s;
      |   ^~~~~~
a.cc:3: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:3:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    3 |   string s;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:3:17: error: 's' was not declared in this scope
    3 |   string s;cin>>s;
      |                 ^
a.cc:4:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    4 |   cout<<s[0]<<s.size()-2<<s[s.size()-1]<<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:4:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    4 |   cout<<s[0]<<s.size()-2<<s[s.size()-1]<<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)
      |     ^~~~
Language: C

#include<iostream>
#include<string>
using namespace std;
int main()
{
	char s[101];
	scanf("%s",s);
	int i;
	int l=strlen(s);
	char a=s[0];
	char b=s[l-1];
	int c=l-2;
	printf("%c%d%c\n",a,c,b);
}

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

#include<iostream>
#include<string>
using namespace std;
int main()
{
	char s[101];
	scanf("%s",s);
	int i;
	int l=strlen(s);
	char a=s[0];
	char b=s[l-1];
	int c=l-2;
	printf("%c%d%c\n",a,c,b);
}

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

#include<iostream>
using namespace std;
main()
{
  string s;cin>>s;
  cout<<s[0]<<s.length()-2<<s[n-1];
}

Compiler output:
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:6:31: error: 'n' was not declared in this scope
    6 |   cout<<s[0]<<s.length()-2<<s[n-1];
      |                               ^
Language: C++

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

int main(){
string yan;
cin>>yan;
cout<< yan,begin<<size(yan)-2<<yan,end<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: invalid operands of types '<unresolved overloaded function type>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} to binary 'operator<<'
    8 | cout<< yan,begin<<size(yan)-2<<yan,end<<endl;
      |            ~~~~~^~~~~~~~~~~~~
a.cc:8:39: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator<<'
    8 | cout<< yan,begin<<size(yan)-2<<yan,end<<endl;
      |                                    ~~~^~~~~~
Language: C++

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

int main2() {

	char c[101];
	char num,chl;

	scanf("%s", &c);

	num = strlen(c);

	chl = c[(num - 1)];

	printf("%c%d%c",c[0],(num-2),chl);

	return 0;

}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include<math.h>
#include<cstdio>
#include<stdio.h>
#include<cstring>
#include<string>
#include<string.h>
#include<cmath>
#include<map>
#include<vector>
#include<set>
#include<algorithm>
using namespace std;
int main()
{
	char s[200];
	gets(s);
	cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
	return 0;
}

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