Language: C++

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

int N, A[10010];
int min(a,N) {  
    for(int i=0;i<N;i++)
    { if(a[i]>a[i+1])
       a[0]=a[i+1];
     else a[i+1]=a[i];
    }

    return a[0] ;
}
     int max(a,N) {
        for(int i=0;i<N;i++)
        { if(a[i]<a[i+1])
           a[0]=a[i+1];
         else a[i+1]=a[i]; 
        }

         return a[0] ;
     }
     
     int sum(a,N) {
        for(int i=0;i<N;i++)
        sum=sum+a[i];
        return sum ;
     }

     int main() {
     cin >> N;
     for (int i=0; i<N; ++i)
     cin >> A[i];
     cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
     }

Compiler output:
a.cc:6:9: error: 'a' was not declared in this scope
    6 | int min(a,N) {
      |         ^
a.cc:6:12: error: expression list treated as compound expression in initializer [-fpermissive]
    6 | int min(a,N) {
      |            ^
a.cc:15:14: error: 'a' was not declared in this scope
   15 |      int max(a,N) {
      |              ^
a.cc:15:17: error: expression list treated as compound expression in initializer [-fpermissive]
   15 |      int max(a,N) {
      |                 ^
a.cc:25:14: error: 'a' was not declared in this scope
   25 |      int sum(a,N) {
      |              ^
a.cc:25:17: error: expression list treated as compound expression in initializer [-fpermissive]
   25 |      int sum(a,N) {
      |                 ^
a.cc: In function 'int main()':
a.cc:35:14: error: reference to 'min' is ambiguous
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |              ^~~
In file included from /usr/include/c++/14/string:51,
                 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/stl_algobase.h:281:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:                 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:6:5: note:                 'int min'
    6 | int min(a,N) {
      |     ^~~
a.cc:35:26: error: expected primary-expression before '?' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                          ^
a.cc:35:27: error: expected primary-expression before '?' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                           ^
a.cc:35:28: error: expected primary-expression before '?' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                            ^
a.cc:35:30: error: expected primary-expression before '?' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                              ^
a.cc:35:31: error: expected primary-expression before '?' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                               ^
a.cc:35:32: error: expected primary-expression before '?' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                ^
a.cc:35:34: error: expected primary-expression before '<<' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                  ^~
a.cc:35:37: error: reference to 'max' is ambiguous
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:                 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:15:10: note:                 'int max'
   15 |      int max(a,N) {
      |          ^~~
a.cc:35:49: error: expected primary-expression before '?' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                 ^
a.cc:35:50: error: expected primary-expression before '?' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                  ^
a.cc:35:51: error: expected primary-expression before '?' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                   ^
a.cc:35:53: error: expected primary-expression before '?' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                     ^
a.cc:35:54: error: expected primary-expression before '?' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                      ^
a.cc:35:55: error: expected primary-expression before '?' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                       ^
a.cc:35:57: error: expected primary-expression before '<<' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                         ^~
a.cc:35:63: error: 'sum' cannot be used as a function
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                            ~~~^~~~~
a.cc:35:76: error: expected ':' before ';' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:35:76: error: expected primary-expression before ';' token
a.cc:35:76: error: expected ':' before ';' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:35:76: error: expected primary-expression before ';' token
a.cc:35:76: error: expected ':' before ';' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:35:76: error: expected primary-expression before ';' token
a.cc:35:76: error: expected ':' before ';' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:35:76: error: expected primary-expression before ';' token
a.cc:35:76: error: expected ':' before ';' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:35:76: error: expected primary-expression before ';' token
a.cc:35:76: error: expected ':' before ';' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:35:76: error: expected primary-expression before ';' token
a.cc:35:76: error: expected ':' before ';' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:35:76: error: expected primary-expression before ';' token
a.cc:35:76: error: expected ':' before ';' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:35:76: error: expected primary-expression before ';' token
a.cc:35:76: error: expected ':' before ';' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:35:76: error: expected primary-expression before ';' token
a.cc:35:76: error: expected ':' before ';' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:35:76: error: expected primary-expression before ';' token
a.cc:35:76: error: expected ':' before ';' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:35:76: error: expected primary-expression before ';' token
a.cc:35:76: error: expected ':' before ';' token
   35 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:35:76: error: expected primary-expression before ';' token