Language: C++

#include <iostream>

using namespace std;

int main()
{
    char a[10];

    cin >> a;
    len = strlen(a)
    int n[len];
    for(int i = 0;a[i+2] == '\0';i++)
    {
        n[i] = atoi(a[i])*100+atoi(a[i+1])*10+atoi(a[i+2]);
    }

    for(int i = strlen(a)-2;i>0;i--)
    {
        if(n[i]>n[i-1])
        {
            tmp = n[i];
            n[i] = n[i-1];
            n[i-1] = tmp;

        }
    }
    printf("%d\n",n[0]);
    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'len' was not declared in this scope; did you mean 'mblen'?
   10 |     len = strlen(a)
      |     ^~~
      |     mblen
a.cc:10:11: error: 'strlen' was not declared in this scope
   10 |     len = strlen(a)
      |           ^~~~~~
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 | 
a.cc:14:9: error: 'n' was not declared in this scope
   14 |         n[i] = atoi(a[i])*100+atoi(a[i+1])*10+atoi(a[i+2]);
      |         ^
a.cc:14:24: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   14 |         n[i] = atoi(a[i])*100+atoi(a[i+1])*10+atoi(a[i+2]);
      |                     ~~~^
      |                        |
      |                        char
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 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/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:14:41: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   14 |         n[i] = atoi(a[i])*100+atoi(a[i+1])*10+atoi(a[i+2]);
      |                                    ~~~~~^
      |                                         |
      |                                         char
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:14:57: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   14 |         n[i] = atoi(a[i])*100+atoi(a[i+1])*10+atoi(a[i+2]);
      |                                                    ~~~~~^
      |                                                         |
      |                                                         char
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:19:12: error: 'n' was not declared in this scope
   19 |         if(n[i]>n[i-1])
      |            ^
a.cc:21:13: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   21 |             tmp = n[i];
      |             ^~~
      |             tm
a.cc:27:19: error: 'n' was not declared in this scope
   27 |     printf("%d\n",n[0]);
      |                   ^