Language: C++

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

int N, A[10010];
int min(a[i],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[i],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[i],N) {
         int sum=0
        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[i],N) {
      |         ^
a.cc:6:11: error: 'i' was not declared in this scope
    6 | int min(a[i],N) {
      |           ^
a.cc:6:15: error: expression list treated as compound expression in initializer [-fpermissive]
    6 | int min(a[i],N) {
      |               ^
a.cc:15:14: error: 'a' was not declared in this scope
   15 |      int max(a[i],N) {
      |              ^
a.cc:15:16: error: 'i' was not declared in this scope
   15 |      int max(a[i],N) {
      |                ^
a.cc:15:20: error: expression list treated as compound expression in initializer [-fpermissive]
   15 |      int max(a[i],N) {
      |                    ^
a.cc:25:14: error: 'a' was not declared in this scope
   25 |      int sum(a[i],N) {
      |              ^
a.cc:25:16: error: 'i' was not declared in this scope
   25 |      int sum(a[i],N) {
      |                ^
a.cc:25:20: error: expression list treated as compound expression in initializer [-fpermissive]
   25 |      int sum(a[i],N) {
      |                    ^
a.cc: In function 'int main()':
a.cc:36:14: error: reference to 'min' is ambiguous
   36 |      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[i],N) {
      |     ^~~
a.cc:36:26: error: expected primary-expression before '?' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                          ^
a.cc:36:27: error: expected primary-expression before '?' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                           ^
a.cc:36:28: error: expected primary-expression before '?' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                            ^
a.cc:36:30: error: expected primary-expression before '?' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                              ^
a.cc:36:31: error: expected primary-expression before '?' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                               ^
a.cc:36:32: error: expected primary-expression before '?' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                ^
a.cc:36:34: error: expected primary-expression before '<<' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                  ^~
a.cc:36:37: error: reference to 'max' is ambiguous
   36 |      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[i],N) {
      |          ^~~
a.cc:36:49: error: expected primary-expression before '?' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                 ^
a.cc:36:50: error: expected primary-expression before '?' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                  ^
a.cc:36:51: error: expected primary-expression before '?' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                   ^
a.cc:36:53: error: expected primary-expression before '?' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                     ^
a.cc:36:54: error: expected primary-expression before '?' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                      ^
a.cc:36:55: error: expected primary-expression before '?' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                       ^
a.cc:36:57: error: expected primary-expression before '<<' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                         ^~
a.cc:36:63: error: 'sum' cannot be used as a function
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                            ~~~^~~~~
a.cc:36:76: error: expected ':' before ';' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:36:76: error: expected primary-expression before ';' token
a.cc:36:76: error: expected ':' before ';' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:36:76: error: expected primary-expression before ';' token
a.cc:36:76: error: expected ':' before ';' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:36:76: error: expected primary-expression before ';' token
a.cc:36:76: error: expected ':' before ';' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:36:76: error: expected primary-expression before ';' token
a.cc:36:76: error: expected ':' before ';' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:36:76: error: expected primary-expression before ';' token
a.cc:36:76: error: expected ':' before ';' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:36:76: error: expected primary-expression before ';' token
a.cc:36:76: error: expected ':' before ';' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:36:76: error: expected primary-expression before ';' token
a.cc:36:76: error: expected ':' before ';' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:36:76: error: expected primary-expression before ';' token
a.cc:36:76: error: expected ':' before ';' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:36:76: error: expected primary-expression before ';' token
a.cc:36:76: error: expected ':' before ';' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:36:76: error: expected primary-expression before ';' token
a.cc:36:76: error: expected ':' before ';' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |                                                                            :
a.cc:36:76: error: expected primary-expression before ';' token
a.cc:36:76: error: expected ':' before ';' token
   36 |      cout << min(A,N) << ??? ??? << max(A,N) << ??? ??? << sum(A,N) << endl;
      |                                                                            ^
      |